-
Notifications
You must be signed in to change notification settings - Fork 2
/
deploy.yml
63 lines (58 loc) · 1.44 KB
/
deploy.yml
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
---
- hosts: all
tasks:
- set_fact:
foreman_database_password: "{{ lookup('password', '/tmp/passwordfile chars=ascii_letters,digits,hexdigits,punctuation') }}"
foreman_admin_password: changeme
foreman_hostname: "{{ hostvars[groups['foreman'][0]]['ansible_fqdn'] }}"
- hosts: all
become: true
vars:
selinux_state: disabled
roles:
- epel_repositories
- selinux
- hosts: foreman
become: true
pre_tasks:
- include_vars:
file: ./certs.yml
failed_when: false
roles:
- foreman_ca
- foreman_certs
- hosts: database
become: true
vars:
foreman_postgresql_password: "{{ foreman_database_password }}"
roles:
- foreman_postgresql
- hosts: foreman
become: true
vars:
foreman_database_host: "{{ hostvars[groups['database'][0]]['ansible_fqdn'] }}"
foreman_setup_foreman_host: "{{ foreman_hostname }}"
pre_tasks:
- include_vars:
file: ./certs.yml
failed_when: false
roles:
- foreman_repositories
- foreman
- foreman_apache
- foreman_setup
- hosts: proxy
become: true
vars:
foreman_setup_foreman_host: "{{ foreman_hostname }}"
foreman_proxy_foreman_host: "{{ foreman_hostname }}"
foreman_proxy_register_foreman_host: "{{ foreman_hostname }}"
pre_tasks:
- include_vars:
file: ./certs.yml
failed_when: false
roles:
- foreman_repositories
- foreman_proxy
- foreman_proxy_register
- foreman_setup