From ef1223bebb760372103bf339316cf13f8412aa8c Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 1 May 2015 19:33:39 +0000 Subject: [PATCH] Make torrent01 rhel7 ansible version of old torrent server. --- inventory/group_vars/torrent | 13 ++++++ .../host_vars/torrent01.fedoraproject.org | 14 ++++++ inventory/inventory | 3 ++ master.yml | 2 +- playbooks/groups/torrent.yml | 45 +++++++++++++++++++ roles/torrent/tasks/main.yml | 5 --- 6 files changed, 76 insertions(+), 6 deletions(-) create mode 100644 inventory/group_vars/torrent create mode 100644 inventory/host_vars/torrent01.fedoraproject.org create mode 100644 playbooks/groups/torrent.yml diff --git a/inventory/group_vars/torrent b/inventory/group_vars/torrent new file mode 100644 index 0000000000..09e23e917f --- /dev/null +++ b/inventory/group_vars/torrent @@ -0,0 +1,13 @@ +--- +# Define resources for this group of hosts here. +lvm_size: 750000 +mem_size: 4096 +num_cpus: 2 + +tcp_ports: [ 53, 80, 443, 873, "6881:6999' ] +udp_ports: [ 53 ] + +fas_client_groups: sysadmin-web,torrentadmin,sysadmin-noc,torrent-cc,fi-apprentice + +nrpe_procs_warn: 300 +nrpe_procs_crit: 500 diff --git a/inventory/host_vars/torrent01.fedoraproject.org b/inventory/host_vars/torrent01.fedoraproject.org new file mode 100644 index 0000000000..8377670290 --- /dev/null +++ b/inventory/host_vars/torrent01.fedoraproject.org @@ -0,0 +1,14 @@ +--- +nm: 255.255.255.128 +gw: 152.19.134.129 +dns: 8.8.8.8 + +volgroup: /dev/vg_guests + +eth0_ip: 152.19.134.151 +ansible_ssh_host: torrent01.fedoraproject.org + +postfix_group: vpn + +vmhost: ibiblio03.fedoraproject.org +datacenter: ibiblio diff --git a/inventory/inventory b/inventory/inventory index e0ddac41d6..feb9917bf7 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -373,6 +373,9 @@ mm-crawler01.stg.phx2.fedoraproject.org people03.fedoraproject.org torrent02.fedoraproject.org +[torrent] +torrent01.fedoraproject.org + [secondary] secondary01.phx2.fedoraproject.org diff --git a/master.yml b/master.yml index ba89008f41..e0cc52177c 100644 --- a/master.yml +++ b/master.yml @@ -30,7 +30,7 @@ - include: /srv/web/infra/ansible/playbooks/groups/buildvm.yml - include: /srv/web/infra/ansible/playbooks/groups/busgateway.yml - include: /srv/web/infra/ansible/playbooks/groups/composers.yml -- include: /srv/web/infra/ansible/playbooks/groups/copr-backend.yml +#- include: /srv/web/infra/ansible/playbooks/groups/copr-backend.yml - include: /srv/web/infra/ansible/playbooks/groups/copr-frontend.yml - include: /srv/web/infra/ansible/playbooks/groups/copr-keygen.yml - include: /srv/web/infra/ansible/playbooks/groups/datagrepper.yml diff --git a/playbooks/groups/torrent.yml b/playbooks/groups/torrent.yml new file mode 100644 index 0000000000..8863d4e1ea --- /dev/null +++ b/playbooks/groups/torrent.yml @@ -0,0 +1,45 @@ +- name: make torrent server + hosts: torrent + user: root + gather_facts: False + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + tasks: + - include: "{{ tasks }}/virt_instance_create.yml" + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: make the box be real + hosts: torrent + user: root + gather_facts: True + + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + roles: + - base + - hosts + - rkhunter + - nagios_client + - fas_client + - collectd/base + - rsyncd + - sudo + - openvpn/client + - torrent + + tasks: + - include: "{{ tasks }}/yumrepos.yml" + - include: "{{ tasks }}/2fa_client.yml" + - include: "{{ tasks }}/motd.yml" + + handlers: + - include: "{{ handlers }}/restart_services.yml" diff --git a/roles/torrent/tasks/main.yml b/roles/torrent/tasks/main.yml index e63038ddee..0bf725e91c 100644 --- a/roles/torrent/tasks/main.yml +++ b/roles/torrent/tasks/main.yml @@ -1,11 +1,6 @@ --- # Configuration for the torrent tracker -- name: clean yum metadata - command: yum clean all - tags: - - packages - - name: install needed packages yum: pkg={{ item }} state=present with_items: