1
0
Fork 0

Move all the tasks inside a block

This commit is contained in:
Daniele Tricoli 2020-10-27 02:37:16 +01:00
parent 4b080b968e
commit ba69ddb9c2

View file

@ -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 }}"