Add group variables to the prereq role (#334)
Signed-off-by: laszlojau <49835454+laszlojau@users.noreply.github.com>pull/341/head
parent
5a12415b3c
commit
1907e6fb79
|
@ -1,2 +1,4 @@
|
|||
---
|
||||
api_port: 6443 # noqa var-naming[no-role-prefix]
|
||||
server_group: server # noqa var-naming[no-role-prefix]
|
||||
agent_group: agent # noqa var-naming[no-role-prefix]
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
- name: If ufw enabled, open etcd ports
|
||||
when:
|
||||
- ufw_status['stdout'] == "Status':' active"
|
||||
- groups['server'] | length > 1
|
||||
- groups[server_group] | length > 1
|
||||
community.general.ufw:
|
||||
rule: allow
|
||||
port: "2379:2381"
|
||||
|
@ -79,7 +79,7 @@
|
|||
immediate: true
|
||||
|
||||
- name: If firewalld enabled, open etcd ports
|
||||
when: groups['server'] | length > 1
|
||||
when: groups[server_group] | length > 1
|
||||
ansible.posix.firewalld:
|
||||
port: "2379-2381/tcp"
|
||||
zone: internal
|
||||
|
@ -111,8 +111,8 @@
|
|||
loop: >-
|
||||
{{
|
||||
(
|
||||
groups['server'] | default([])
|
||||
+ groups['agent'] | default([])
|
||||
groups[server_group] | default([])
|
||||
+ groups[agent_group] | default([])
|
||||
)
|
||||
| map('extract', hostvars, ['ansible_default_ipv4', 'address'])
|
||||
| flatten | unique | list
|
||||
|
|
Loading…
Reference in New Issue