use become
This commit is contained in:
parent
c6f2c9c54f
commit
1f36ad2c49
@ -1,5 +1,5 @@
|
||||
---
|
||||
- name: restart iptables
|
||||
- name: Restart iptables
|
||||
shell: sleep 2 && systemctl restart iptables
|
||||
async: 1
|
||||
poll: 0
|
||||
|
@ -1,4 +1,6 @@
|
||||
---
|
||||
- name: Setup iptables
|
||||
block:
|
||||
- name: Set custom iptables rules
|
||||
iptables_raw:
|
||||
name: 'iptables_custom_rules_{{ item.name }}'
|
||||
@ -28,3 +30,4 @@
|
||||
state: '{{ (iptables_default_tail != "" ) | ternary("present", "absent") }}'
|
||||
rules: '{{ iptables_default_tail }}'
|
||||
tags: iptables
|
||||
become: True
|
||||
|
@ -1,7 +1,9 @@
|
||||
---
|
||||
- name: Install package
|
||||
- name: Install iptables
|
||||
block:
|
||||
- name: Install packages
|
||||
package:
|
||||
name: '{{ iptables_package }}'
|
||||
name: "{{ iptables_package }}"
|
||||
state: latest
|
||||
|
||||
- name: Enable and start service
|
||||
@ -9,3 +11,4 @@
|
||||
name: iptables
|
||||
enabled: True
|
||||
state: started
|
||||
become: True
|
||||
|
Loading…
Reference in New Issue
Block a user