Remove unnecessary use of become from some roles

This should make execution much faster
This commit is contained in:
Jake Howard
2024-09-05 23:33:49 +01:00
parent 25cd394f08
commit d5a7a61171
68 changed files with 11 additions and 243 deletions

View File

@ -2,13 +2,11 @@
service:
name: wg-quick@wg0
state: restarted
become: true
- name: reload nginx
service:
name: nginx
state: reloaded
become: true
- name: reload nftables
command:
@ -16,4 +14,3 @@
- nft
- -f
- /etc/nftables.conf
become: true

View File

@ -1,7 +1,6 @@
- name: Install nftables
package:
name: nftables
become: true
- name: Copy firewall config
template:
@ -9,7 +8,6 @@
dest: /etc/nftables.conf
validate: nft -c -f %s
mode: "644"
become: true
notify: reload nftables
- name: Enable nftables
@ -17,4 +15,3 @@
name: nftables
enabled: true
state: started
become: true

View File

@ -3,5 +3,4 @@
src: files/nginx.conf
dest: /etc/nginx/stream.d/ingress.conf
mode: "0644"
become: true
notify: reload nginx

View File

@ -1,8 +1,6 @@
- name: Install Wireguard
package:
name:
- wireguard
become: true
name: wireguard
- name: Get wireguard credentials
set_fact:
@ -14,14 +12,12 @@
dest: /etc/wireguard/wg0.conf
mode: "0600"
backup: true
become: true
notify: restart wireguard
- name: Enable wireguard
service:
name: wg-quick@wg0
enabled: true
become: true
- name: Enable p2p communication
sysctl:
@ -31,4 +27,3 @@
state: present
reload: true
sysctl_file: /etc/sysctl.d/99-sysctl.conf
become: true