Move all the tasks inside a block
This commit is contained in:
parent
4b080b968e
commit
ba69ddb9c2
|
@ -1,24 +1,23 @@
|
|||
---
|
||||
- name: install nftables
|
||||
apt:
|
||||
name: nftables
|
||||
state: present
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
become: true
|
||||
- block:
|
||||
- name: install nftables
|
||||
apt:
|
||||
name: nftables
|
||||
state: present
|
||||
update_cache: true
|
||||
cache_valid_time: 3600
|
||||
|
||||
- name: install nftables.conf
|
||||
copy:
|
||||
src: etc/nftables.conf
|
||||
dest: /etc/nftables.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
become: true
|
||||
- name: install nftables.conf
|
||||
template:
|
||||
src: etc/nftables.conf.j2
|
||||
dest: /etc/nftables.conf
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: start nftables
|
||||
systemd:
|
||||
name: nftables.service
|
||||
state: started
|
||||
enabled: true
|
||||
become: true
|
||||
- name: start nftables
|
||||
systemd:
|
||||
name: nftables.service
|
||||
state: started
|
||||
enabled: true
|
||||
become: "{{ nftables_become }}"
|
||||
|
|
Loading…
Reference in a new issue