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,10 +2,8 @@
service:
name: nginx
state: reloaded
become: true
- name: restart qbittorrent
service:
name: qbittorrent-nox@{{ qbittorrent_user.name }}
state: restarted
become: true

View File

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

View File

@ -1,20 +1,17 @@
- name: Install qbittorrent
package:
name: qbittorrent-nox
become: true
- name: Create user
user:
name: qbittorrent
system: true
become: true
register: qbittorrent_user
- name: Enable service
service:
name: qbittorrent-nox@{{ qbittorrent_user.name }}
enabled: true
become: true
- name: Set configuration
ini_file:
@ -42,5 +39,4 @@
- {section: Preferences, option: Bittorrent\MaxConnecsPerTorrent, value: -1"}
- {section: Preferences, option: Bittorrent\MaxUploads, value: -1"}
- {section: Preferences, option: Bittorrent\MaxUploadsPerTorrent, value: -1"}
become: true
notify: restart qbittorrent