summaryrefslogtreecommitdiffstats
path: root/playbooks/groups/taskotron-dev.yml
blob: b88ee0cc3e91b72227d58e2a4bcce770adfc8e15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
# 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

- name: make taskotron dev
  hosts: taskotron-dev
  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: 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: 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: yum-cron, tags: ['yumcron'] }
   - { 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
  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'] }
   - { role: taskotron/taskotron-proxy, tags: ['taskotronproxy'] }
   - { role: taskotron/fake_fedorainfra, tags: ['fakefedorainfra'] }
   - { role: taskotron/ssl-taskotron, tags: ['ssltaskotron'] }

  handlers:
   - include: "{{ handlers }}/restart_services.yml"


############################################################
# buildbot master setup
#
# Since the buildmaster runs as non-root, do the config as
# the appropriate non-root user
############################################################

# all the bits needed for this are not in this repo yet
#- name: buildbot master setup
#  hosts: taskotron-dev
#  sudo: yes
#  sudo_user: "{{ master_user }}"
#  tags:
#    - buildmasterconfig
#
#  # this eventually needs to differentiate between staging and production cedrts
#  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 }}/buildmaster-config.yml"
#
#  handlers:
#    - include: "{{ handlers }}/restart_services.yml"