Fixing loop logic for blank values
This commit is contained in:
parent
5b95018a6c
commit
97cf1735cb
2 changed files with 6 additions and 7 deletions
|
@ -17,7 +17,7 @@ nginx_cluster_open_ports:
|
|||
- 443
|
||||
nginx_cluster_sebool: ""
|
||||
|
||||
nginx_cluster_aditional_packages:
|
||||
nginx_cluster_additional_packages:
|
||||
- php-ldap
|
||||
- php-bcmath
|
||||
- php-gd
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
package:
|
||||
name: "{{ item }}"
|
||||
state: latest
|
||||
loop: "{{ nginx_cluster_aditional_packages }}"
|
||||
loop: "{{ nginx_cluster_additional_packages | default([], true) }}"
|
||||
tags: packages
|
||||
|
||||
- name: Create a symbolic link for host cert
|
||||
|
@ -100,15 +100,14 @@
|
|||
proto: tcp
|
||||
setype: http_port_t
|
||||
state: present
|
||||
loop: "{{ nginx_cluster_open_ports }}"
|
||||
loop: "{{ nginx_cluster_open_ports | default([], true) }}"
|
||||
|
||||
- name: Set selinux flags
|
||||
seboolean:
|
||||
name: "{{ item }}"
|
||||
state: true
|
||||
persistent: true
|
||||
loop: "{{ nginx_cluster_sebool }}"
|
||||
when: nginx_cluster_sebool != ''
|
||||
loop: "{{ nginx_cluster_sebool | default([], true) }}"
|
||||
|
||||
- name: Start and enable lsyncd
|
||||
service:
|
||||
|
@ -130,7 +129,7 @@
|
|||
|
||||
- name: Enable firewall for access IPs
|
||||
include_tasks: firewall.yml
|
||||
loop: "{{ nginx_cluster_access_ip }}"
|
||||
loop: "{{ nginx_cluster_access_ip | default([], true) }}"
|
||||
loop_control:
|
||||
loop_var: access_ip
|
||||
when: nginx_cluster_access_ip != ""
|
||||
|
@ -142,5 +141,5 @@
|
|||
immediate: yes
|
||||
state: enabled
|
||||
notify: Reload firewalld
|
||||
loop: "{{ nginx_cluster_open_ports }}"
|
||||
loop: "{{ nginx_cluster_open_ports | default([], true) }}"
|
||||
when: nginx_cluster_access_ip == ""
|
||||
|
|
Loading…
Reference in a new issue