From 0a8c78bedb93123b6cb58da69754c2a324bab05f Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 27 Jan 2015 15:20:18 +0000 Subject: [PATCH] Make a mirrorlist2 playbook and group and move host1plus mirrorlist to it. --- .../mirrorlist-host1plus.fedoraproject.org | 4 +- inventory/inventory | 4 +- playbooks/groups/mirrorlist2.yml | 56 +++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 playbooks/groups/mirrorlist2.yml diff --git a/inventory/host_vars/mirrorlist-host1plus.fedoraproject.org b/inventory/host_vars/mirrorlist-host1plus.fedoraproject.org index cc6172a871..4470d79022 100644 --- a/inventory/host_vars/mirrorlist-host1plus.fedoraproject.org +++ b/inventory/host_vars/mirrorlist-host1plus.fedoraproject.org @@ -2,8 +2,8 @@ nm: 255.255.255.0 gw: 5.175.150.1 dns: 217.69.160.18 -ks_url: http://209.132.181.6/repo/rhel/ks/kvm-rhel-6 -ks_repo: http://209.132.181.6/repo/rhel/RHEL6-x86_64/ +ks_url: http://209.132.181.6/repo/rhel/ks/kvm-rhel-7 +ks_repo: http://209.132.181.6/repo/rhel/RHEL7-x86_64/ volgroup: /dev/vg_virthost eth0_ip: 5.175.150.49 vmhost: host1plus01.fedoraproject.org diff --git a/inventory/inventory b/inventory/inventory index 40a170012b..af01a67a6f 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -340,9 +340,11 @@ memcached02.phx2.fedoraproject.org mirrorlist-osuosl.fedoraproject.org mirrorlist-ibiblio.fedoraproject.org mirrorlist-phx2.phx2.fedoraproject.org -mirrorlist-host1plus.fedoraproject.org mirrorlist-dedicatedsolutions.fedoraproject.org +[mirrorlist2] +mirrorlist-host1plus.fedoraproject.org + [mm-stg] mirrorlist-phx2.stg.phx2.fedoraproject.org mm-frontend01.stg.phx2.fedoraproject.org diff --git a/playbooks/groups/mirrorlist2.yml b/playbooks/groups/mirrorlist2.yml new file mode 100644 index 0000000000..72fe372435 --- /dev/null +++ b/playbooks/groups/mirrorlist2.yml @@ -0,0 +1,56 @@ +# create a new mirrorlist server +# NOTE: should be used with --limit most of the time +# NOTE: make sure there is room/space for this server on the vmhost +# NOTE: most of these vars_path come from group_vars/mirrorlist or from hostvars + +- name: make mirrorlist app server + hosts: mirrorlist2 + 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: mirrorlist2 + 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 + - rkhunter + - denyhosts + - nagios_client + - geoip + - hosts + - fas_client + - collectd/base + - mirrormanager/mirrorlist2 + - sudo + - { role: openvpn/client, + when: env != "staging" } + + tasks: + # this is how you include other task lists + - include: "{{ tasks }}/yumrepos.yml" + - include: "{{ tasks }}/2fa_client.yml" + - include: "{{ tasks }}/motd.yml" + - include: "{{ tasks }}/apache.yml" + - include: "{{ tasks }}/mod_wsgi.yml" + + + handlers: + - include: "{{ handlers }}/restart_services.yml"