From a5482ba90e3f310da953d9ff1c1faa489d3d8715 Mon Sep 17 00:00:00 2001 From: Tim Flink Date: Thu, 21 Jan 2016 15:50:46 +0000 Subject: [PATCH] starting migration from separate to unified taskotron playbook --- playbooks/groups/taskotron.yml | 74 ++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 playbooks/groups/taskotron.yml diff --git a/playbooks/groups/taskotron.yml b/playbooks/groups/taskotron.yml new file mode 100644 index 0000000000..f9e5294a17 --- /dev/null +++ b/playbooks/groups/taskotron.yml @@ -0,0 +1,74 @@ +--- +# create a new taskotron dev server +# 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 + +- include: "/srv/web/infra/ansible/playbooks/include/virt-create.yml myhosts=taskotron-dev,taskotron-stg" + +- name: make the box be real + hosts: taskotron-dev:taskotron-stg + 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: + - { role: base, tags: ['base'] } + - { role: rkhunter, tags: ['rkhunter'] } + - { role: nagios_client, tags: ['nagios_client'] } + - { role: hosts, tags: ['hosts']} + - { role: fas_client, tags: ['fas_client'] } + - { role: collectd/base, tags: ['collectd_base'] } + - { role: dnf-automatic, tags: ['dnfautomatic'] } + - { role: sudo, tags: ['sudo'] } + - apache + + tasks: + # this is how you include other task lists + - include: "{{ tasks }}/yumrepos.yml" + - include: "{{ tasks }}/2fa_client.yml" + - include: "{{ tasks }}/motd.yml" + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: configure taskotron master + hosts: taskotron-dev:taskotron-stg + 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: + - { role: taskotron/grokmirror, tags: ['grokmirror'] } +# - { role: taskotron/cgit, tags: ['cgit'] } + - { role: taskotron/buildmaster, tags: ['buildmaster'] } + - { role: taskotron/buildmaster-configure, tags: ['buildmasterconfig'] } + - { role: taskotron/taskotron-trigger, tags: ['trigger'] } + - { role: taskotron/taskotron-frontend, tags: ['frontend'] } + + handlers: + - include: "{{ handlers }}/restart_services.yml" + +- name: configure standalone taskotron host + hosts: taskotron-dev + 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: + - { role: taskotron/taskotron-proxy, tags: ['taskotronproxy'] } + - { role: taskotron/ssl-taskotron, tags: ['ssltaskotron'] } + + handlers: + - include: "{{ handlers }}/restart_services.yml"