Skip to content

Commit 0063d34

Browse files
committed
chore: last ansible
1 parent a9e4cca commit 0063d34

File tree

12 files changed

+258
-38
lines changed

12 files changed

+258
-38
lines changed

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22

3-
kube_firewall_zone: 'public'
3+
kube_firewall_zone: 'internal'
44
cert_manager_chart_version: 'v1.19.1'
55
cmtcl_version: 'v2.3.0'

molecule/default/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
vars:
77
secure_logs: False
88
# preferred_nic: "eth1"
9-
kube_firewall_zone: 'public'
9+
kube_firewall_zone: 'internal'
1010
master_preferred_nic: "eth1"
1111
preferred_nic: "eth1"
1212
reset_kube: True

molecule/default/prepare.yml

Lines changed: 82 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
# TODO This phase fails once
3-
- name: Prepare IDM server
3+
4+
- name: Prepare IDM
45
hosts:
56
- idm.osgiliath.test
67
tasks:
@@ -14,13 +15,77 @@
1415
secure_logs: False
1516
preferred_nic: "eth1"
1617
idm_preferred_nic: "eth1"
17-
master_preferred_nic: "eth1"
1818
company_domain: osgiliath.test
1919
company_realm_password: '123ADMin'
2020
company_ad_password: '123ADmPass'
21-
- import_role:
21+
- include_role:
22+
name: tcharl.ansible_nameserver
23+
vars:
24+
standalone_role: False
25+
secure_logs: False
26+
preferred_nic: "eth1"
27+
company_domain: osgiliath.test
28+
idm_preferred_nic: "eth1"
29+
company_realm_password: '123ADMin'
30+
company_ad_password: '123ADmPass'
31+
- name: Prepare IPA clients
32+
hosts:
33+
- master.osgiliath.test
34+
- node1.osgiliath.test
35+
tasks:
36+
- name: "install fedora ansible prerequisites"
37+
ansible.builtin.raw: dnf install -y python3 python3-libdnf5
38+
changed_when: false
39+
become: true
40+
- include_role:
41+
name: tcharl.ansible_securehost
42+
vars:
43+
standalone_role: False
44+
secure_logs: False
45+
preferred_nic: "eth1"
46+
company_domain: osgiliath.test
47+
idm_preferred_nic: "eth1"
48+
company_realm_password: '123ADMin'
49+
company_ad_password: '123ADmPass'
50+
- include_role:
51+
name: tcharl.ansible_nameserver
52+
vars:
53+
standalone_role: False
54+
secure_logs: False
55+
preferred_nic: "eth1"
56+
company_domain: osgiliath.test
57+
idm_preferred_nic: "eth1"
58+
company_realm_password: '123ADMin'
59+
company_ad_password: '123ADmPass'
60+
- name: Prepare NFS server on Master
61+
hosts:
62+
- master.osgiliath.test
63+
tasks:
64+
- include_role:
2265
name: tcharl.nfs_server
23-
- name: Prepare
66+
vars:
67+
standalone_role: False
68+
secure_logs: False
69+
preferred_nic: "eth1"
70+
company_domain: osgiliath.test
71+
idm_preferred_nic: "eth1"
72+
company_realm_password: '123ADMin'
73+
company_ad_password: '123ADmPass'
74+
- name: Prepare NFS client on Node
75+
hosts:
76+
- node1.osgiliath.test
77+
tasks:
78+
- include_role:
79+
name: tcharl.nfs_client
80+
vars:
81+
standalone_role: False
82+
secure_logs: False
83+
preferred_nic: "eth1"
84+
company_domain: osgiliath.test
85+
idm_preferred_nic: "eth1"
86+
company_realm_password: '123ADMin'
87+
company_ad_password: '123ADmPass'
88+
- name: Prepare Kubernetes
2489
hosts:
2590
- master.osgiliath.test
2691
- node1.osgiliath.test
@@ -30,13 +95,24 @@
3095
changed_when: false
3196
become: true
3297
- include_role:
33-
name: tcharl.kube_certmanager
34-
tasks_from: requirements.yml
98+
name: tcharl.ansible_orchestration
3599
vars:
100+
standalone_role: False
36101
secure_logs: False
37102
preferred_nic: "eth1"
103+
company_domain: osgiliath.test
38104
idm_preferred_nic: "eth1"
39105
master_preferred_nic: "eth1"
106+
company_realm_password: '123ADMin'
107+
company_ad_password: '123ADmPass'
108+
- include_role:
109+
name: tcharl.ansible_orchestration_cli
110+
vars:
111+
standalone_role: False
112+
secure_logs: False
113+
preferred_nic: "eth1"
40114
company_domain: osgiliath.test
115+
idm_preferred_nic: "eth1"
116+
master_preferred_nic: "eth1"
41117
company_realm_password: '123ADMin'
42118
company_ad_password: '123ADmPass'

molecule/kvm/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
preferred_nic: "eth1"
99
master_preferred_nic: "eth1"
1010
idm_preferred_nic: "eth1"
11-
kube_firewall_zone: 'public'
11+
kube_firewall_zone: 'internal'
1212
standalone_role: False
1313
reset_kube: True
1414
company_domain: osgiliath.test

molecule/kvm/prepare.yml

Lines changed: 82 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
# TODO This phase fails once
3-
- name: Prepare IDM server
3+
4+
- name: Prepare IDM
45
hosts:
56
- idm.osgiliath.test
67
tasks:
@@ -14,13 +15,77 @@
1415
secure_logs: False
1516
preferred_nic: "eth1"
1617
idm_preferred_nic: "eth1"
17-
master_preferred_nic: "eth1"
1818
company_domain: osgiliath.test
1919
company_realm_password: '123ADMin'
2020
company_ad_password: '123ADmPass'
21-
- import_role:
21+
- include_role:
22+
name: tcharl.ansible_nameserver
23+
vars:
24+
standalone_role: False
25+
secure_logs: False
26+
preferred_nic: "eth1"
27+
company_domain: osgiliath.test
28+
idm_preferred_nic: "eth1"
29+
company_realm_password: '123ADMin'
30+
company_ad_password: '123ADmPass'
31+
- name: Prepare IPA clients
32+
hosts:
33+
- master.osgiliath.test
34+
- node1.osgiliath.test
35+
tasks:
36+
- name: "install fedora ansible prerequisites"
37+
ansible.builtin.raw: dnf install -y python3 python3-libdnf5
38+
changed_when: false
39+
become: true
40+
- include_role:
41+
name: tcharl.ansible_securehost
42+
vars:
43+
standalone_role: False
44+
secure_logs: False
45+
preferred_nic: "eth1"
46+
company_domain: osgiliath.test
47+
idm_preferred_nic: "eth1"
48+
company_realm_password: '123ADMin'
49+
company_ad_password: '123ADmPass'
50+
- include_role:
51+
name: tcharl.ansible_nameserver
52+
vars:
53+
standalone_role: False
54+
secure_logs: False
55+
preferred_nic: "eth1"
56+
company_domain: osgiliath.test
57+
idm_preferred_nic: "eth1"
58+
company_realm_password: '123ADMin'
59+
company_ad_password: '123ADmPass'
60+
- name: Prepare NFS server on Master
61+
hosts:
62+
- master.osgiliath.test
63+
tasks:
64+
- include_role:
2265
name: tcharl.nfs_server
23-
- name: Prepare
66+
vars:
67+
standalone_role: False
68+
secure_logs: False
69+
preferred_nic: "eth1"
70+
company_domain: osgiliath.test
71+
idm_preferred_nic: "eth1"
72+
company_realm_password: '123ADMin'
73+
company_ad_password: '123ADmPass'
74+
- name: Prepare NFS client on Node
75+
hosts:
76+
- node1.osgiliath.test
77+
tasks:
78+
- include_role:
79+
name: tcharl.nfs_client
80+
vars:
81+
standalone_role: False
82+
secure_logs: False
83+
preferred_nic: "eth1"
84+
company_domain: osgiliath.test
85+
idm_preferred_nic: "eth1"
86+
company_realm_password: '123ADMin'
87+
company_ad_password: '123ADmPass'
88+
- name: Prepare Kubernetes
2489
hosts:
2590
- master.osgiliath.test
2691
- node1.osgiliath.test
@@ -30,13 +95,24 @@
3095
changed_when: false
3196
become: true
3297
- include_role:
33-
name: tcharl.kube_certmanager
34-
tasks_from: requirements.yml
98+
name: tcharl.ansible_orchestration
3599
vars:
100+
standalone_role: False
36101
secure_logs: False
37102
preferred_nic: "eth1"
103+
company_domain: osgiliath.test
38104
idm_preferred_nic: "eth1"
39105
master_preferred_nic: "eth1"
106+
company_realm_password: '123ADMin'
107+
company_ad_password: '123ADmPass'
108+
- include_role:
109+
name: tcharl.ansible_orchestration_cli
110+
vars:
111+
standalone_role: False
112+
secure_logs: False
113+
preferred_nic: "eth1"
40114
company_domain: osgiliath.test
115+
idm_preferred_nic: "eth1"
116+
master_preferred_nic: "eth1"
41117
company_realm_password: '123ADMin'
42118
company_ad_password: '123ADmPass'

molecule/parallels/converge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
idm_preferred_nic: "eth1"
1010
master_preferred_nic: "eth1"
1111
kubernetes_allow_pods_on_master: False
12-
kube_firewall_zone: 'public'
12+
kube_firewall_zone: 'internal'
1313
standalone_role: False
1414
company_domain: osgiliath.test
1515
company_realm_password: '123ADMin'

molecule/parallels/prepare.yml

Lines changed: 82 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
# TODO This phase fails once
3-
- name: Prepare IDM server
3+
4+
- name: Prepare IDM
45
hosts:
56
- idm.osgiliath.test
67
tasks:
@@ -14,13 +15,77 @@
1415
secure_logs: False
1516
preferred_nic: "eth1"
1617
idm_preferred_nic: "eth1"
17-
master_preferred_nic: "eth1"
1818
company_domain: osgiliath.test
1919
company_realm_password: '123ADMin'
2020
company_ad_password: '123ADmPass'
21-
- import_role:
21+
- include_role:
22+
name: tcharl.ansible_nameserver
23+
vars:
24+
standalone_role: False
25+
secure_logs: False
26+
preferred_nic: "eth1"
27+
company_domain: osgiliath.test
28+
idm_preferred_nic: "eth1"
29+
company_realm_password: '123ADMin'
30+
company_ad_password: '123ADmPass'
31+
- name: Prepare IPA clients
32+
hosts:
33+
- master.osgiliath.test
34+
- node1.osgiliath.test
35+
tasks:
36+
- name: "install fedora ansible prerequisites"
37+
ansible.builtin.raw: dnf install -y python3 python3-libdnf5
38+
changed_when: false
39+
become: true
40+
- include_role:
41+
name: tcharl.ansible_securehost
42+
vars:
43+
standalone_role: False
44+
secure_logs: False
45+
preferred_nic: "eth1"
46+
company_domain: osgiliath.test
47+
idm_preferred_nic: "eth1"
48+
company_realm_password: '123ADMin'
49+
company_ad_password: '123ADmPass'
50+
- include_role:
51+
name: tcharl.ansible_nameserver
52+
vars:
53+
standalone_role: False
54+
secure_logs: False
55+
preferred_nic: "eth1"
56+
company_domain: osgiliath.test
57+
idm_preferred_nic: "eth1"
58+
company_realm_password: '123ADMin'
59+
company_ad_password: '123ADmPass'
60+
- name: Prepare NFS server on Master
61+
hosts:
62+
- master.osgiliath.test
63+
tasks:
64+
- include_role:
2265
name: tcharl.nfs_server
23-
- name: Prepare
66+
vars:
67+
standalone_role: False
68+
secure_logs: False
69+
preferred_nic: "eth1"
70+
company_domain: osgiliath.test
71+
idm_preferred_nic: "eth1"
72+
company_realm_password: '123ADMin'
73+
company_ad_password: '123ADmPass'
74+
- name: Prepare NFS client on Node
75+
hosts:
76+
- node1.osgiliath.test
77+
tasks:
78+
- include_role:
79+
name: tcharl.nfs_client
80+
vars:
81+
standalone_role: False
82+
secure_logs: False
83+
preferred_nic: "eth1"
84+
company_domain: osgiliath.test
85+
idm_preferred_nic: "eth1"
86+
company_realm_password: '123ADMin'
87+
company_ad_password: '123ADmPass'
88+
- name: Prepare Kubernetes
2489
hosts:
2590
- master.osgiliath.test
2691
- node1.osgiliath.test
@@ -30,13 +95,24 @@
3095
changed_when: false
3196
become: true
3297
- include_role:
33-
name: tcharl.kube_certmanager
34-
tasks_from: requirements.yml
98+
name: tcharl.ansible_orchestration
3599
vars:
100+
standalone_role: False
36101
secure_logs: False
37102
preferred_nic: "eth1"
103+
company_domain: osgiliath.test
38104
idm_preferred_nic: "eth1"
39105
master_preferred_nic: "eth1"
106+
company_realm_password: '123ADMin'
107+
company_ad_password: '123ADmPass'
108+
- include_role:
109+
name: tcharl.ansible_orchestration_cli
110+
vars:
111+
standalone_role: False
112+
secure_logs: False
113+
preferred_nic: "eth1"
40114
company_domain: osgiliath.test
115+
idm_preferred_nic: "eth1"
116+
master_preferred_nic: "eth1"
41117
company_realm_password: '123ADMin'
42118
company_ad_password: '123ADmPass'

tasks/ipa-facts.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212
msg: "{{ idm_preferred_nic | default(omit) }}"
1313
verbosity: 3
1414

15+
- name: Facts | compute ip if preferred_nic is not set
16+
ansible.builtin.set_fact:
17+
kube_certmanager_ipa_current_host_ip: "{{ kube_certmanager_idm_host_facts.ansible_facts['ansible_' + idm_preferred_nic | replace('-', '_')].ipv4.address if (idm_preferred_nic is defined and not idm_preferred_nic.skipped is defined) else kube_certmanager_idm_host_facts.ansible_facts.ansible_default_ipv4.address | default(kube_certmanager_idm_host_facts.ansible_facts.ansible_all_ipv4_addresses | first) }}"
18+
1519
- name: Facts | compute ip if preferred_nic is not set
1620
ansible.builtin.debug:
17-
msg: "{{ kube_certmanager_idm_host_facts.ansible_facts['ansible_' + idm_preferred_nic | replace('-', '_')].ipv4.address if (idm_preferred_nic is defined and not idm_preferred_nic.skipped is defined) else kube_certmanager_idm_host_facts.ansible_facts.ansible_default_ipv4.address | default(kube_certmanager_idm_host_facts.ansible_facts.ansible_all_ipv4_addresses | first) }}"
18-
register: kube_certmanager_ipa_current_host_ip
21+
msg: "{{ kube_certmanager_ipa_current_host_ip }}"
22+
verbosity: 1

0 commit comments

Comments
 (0)