Skip to content

Commit

Permalink
Simple variable syntax error.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdebock committed Oct 7, 2018
1 parent 64873f5 commit d588bbb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion molecule/default/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
become: true

roles:
- role: ansible-role-bootstrap
- role: robertdebock.bootstrap
- role: ansible-role-firewall

tasks:
- name: test connection
Expand Down
12 changes: 6 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
- name: remove conflicting software
package:
name: "{{ firewall_packages['conflicting'][ansible_distribution]
| default[firewall_packages['conflicting']['default']) }}"
| default(firewall_packages['conflicting']['default']) }}"
state: absent
when:
- firewall_packages.conflicting is defined

- name: install required software
package:
name: "{{ firewall_packages['required'][ansible_distribution]
| default[firewall_packages['required']['default']) }}"
| default(firewall_packages['required']['default']) }}"
state: "{{ firewall_package_state }}"
when:
- firewall_packages.required is defined
Expand Down Expand Up @@ -65,20 +65,20 @@
state: enabled
when:
- firewall_service[ansible_distribution]
| default[firewall_service['default'] ) == "ufw"
| default(firewall_service['default']) == "ufw"
- ansible_virtualization_type != "docker"

- name: configure iptables
template:
src: iptables.j2
dest: "{{ firewall_iptables_rulefile[ansible_distribution]
| default[firewall_iptables_rulefile['default'] }}"
| default(firewall_iptables_rulefile['default'] }}"
validate: "iptables-restore --test %s"
when:
- ansible_virtualization_type != "docker"
- firewall_services is defined
- firewall_service[ansible_distribution]
| default[firewall_service['default'] ) == "iptables"
| default(firewall_service['default']) == "iptables"
loop_control:
label: "{{ item.name }}"
notify:
Expand All @@ -87,7 +87,7 @@
- name: start and enable software
service:
name: "{{ firewall_service[ansible_distribution]
| default[firewall_service['default'] }}"
| default(firewall_service['default']) }}"
state: started
enabled: true
when:
Expand Down

0 comments on commit d588bbb

Please sign in to comment.