Use block for become
This commit is contained in:
parent
6b7bb404bd
commit
3200471f68
@ -1,6 +1,7 @@
|
||||
---
|
||||
- become: yes
|
||||
block:
|
||||
- name: install needed tools
|
||||
become: yes
|
||||
apt:
|
||||
update_cache: yes
|
||||
pkg:
|
||||
@ -13,7 +14,6 @@
|
||||
- build-essential
|
||||
|
||||
- name: install octoprint software
|
||||
become: yes
|
||||
become_user: octoprint
|
||||
shell:
|
||||
chdir: /home/octoprint
|
||||
|
@ -1,19 +1,18 @@
|
||||
---
|
||||
- become: yes
|
||||
block:
|
||||
- name: copy systemd service config
|
||||
become: yes
|
||||
copy:
|
||||
src: octoprint.service
|
||||
dest: /lib/systemd/system/octoprint.service
|
||||
|
||||
- name: enable systemd service
|
||||
become: yes
|
||||
systemd:
|
||||
name: octoprint
|
||||
enabled: yes
|
||||
state: started
|
||||
|
||||
- name: enable octoprint to restart itself
|
||||
become: yes
|
||||
copy:
|
||||
src: sudoers.conf
|
||||
dest: /etc/sudoers.d/octoprint
|
||||
|
Loading…
Reference in New Issue
Block a user