Move become: true into esphome role
Move become: true into zigbee2mqtt role Remove become: true from deploy_public_reverse_proxy playbook Remove become: true from deploy_dokuwiki playbook Move become: true from deploy_audio_pi and deploy_light playbooks into roles Remove become: true from deploy_keycloak playbook Move become: true from deploy_automation playbook to mosquitto role
This commit is contained in:
		
					parent
					
						
							
								b56ca3899d
							
						
					
				
			
			
				commit
				
					
						33d1cfca1f
					
				
			
		
					 24 changed files with 119 additions and 20 deletions
				
			
		|  | @ -1,12 +1,15 @@ | |||
| - name: Ensure acl is installed | ||||
|   become: true | ||||
|   ansible.builtin.apt: | ||||
|     name: acl | ||||
| 
 | ||||
| - name: Ensure git is installed | ||||
|   become: true | ||||
|   ansible.builtin.apt: | ||||
|     name: git | ||||
| 
 | ||||
| - name: Ensure zigbee2mqtt user exists | ||||
|   become: true | ||||
|   ansible.builtin.user: | ||||
|     name: zigbee2mqtt | ||||
|     groups: | ||||
|  | @ -15,6 +18,7 @@ | |||
|     group: zigbee2mqtt | ||||
| 
 | ||||
| - name: Ensure installation directory exists | ||||
|   become: true | ||||
|   ansible.builtin.file: | ||||
|     dest: /opt/zigbee2mqtt | ||||
|     state: directory | ||||
|  | @ -23,6 +27,7 @@ | |||
|     group: zigbee2mqtt | ||||
| 
 | ||||
| - name: Ensure zigbee2mqtt repository is cloned | ||||
|   become: true | ||||
|   become_user: zigbee2mqtt | ||||
|   ansible.builtin.git: | ||||
|     repo: https://github.com/Koenkk/zigbee2mqtt.git | ||||
|  | @ -32,6 +37,7 @@ | |||
|   notify: Restart zigbee2mqtt | ||||
| 
 | ||||
| - name: Ensure npm dependencies are installed | ||||
|   become: true | ||||
|   become_user: zigbee2mqtt | ||||
|   community.general.npm: | ||||
|     path: /opt/zigbee2mqtt | ||||
|  | @ -39,6 +45,7 @@ | |||
|   changed_when: false # installs packages according to package-lock.json, but always reports a change | ||||
| 
 | ||||
| - name: Ensure custom zigbee2mqtt data directory exists | ||||
|   become: true | ||||
|   ansible.builtin.file: | ||||
|     dest: /home/zigbee2mqtt/zigbee2mqtt_data | ||||
|     state: directory | ||||
|  | @ -52,6 +59,7 @@ | |||
|   register: zigbee2mqtt__conf_stat | ||||
| 
 | ||||
| - name: Ensure configuration file is deployed when it doesn't exist | ||||
|   become: true | ||||
|   when: not zigbee2mqtt__conf_stat.stat.exists | ||||
|   ansible.builtin.copy: | ||||
|     content: "{{ zigbee2mqtt__config }}" | ||||
|  | @ -62,6 +70,7 @@ | |||
|   notify: Restart zigbee2mqtt | ||||
| 
 | ||||
| - name: Ensure zigbee2mqtt service file is deployed | ||||
|   become: true | ||||
|   ansible.builtin.copy: | ||||
|     src: zigbee2mqtt.service | ||||
|     dest: /etc/systemd/system/zigbee2mqtt.service | ||||
|  | @ -71,6 +80,7 @@ | |||
|   notify: Reload systemd-daemon and restart zigbee2mqtt | ||||
| 
 | ||||
| - name: Ensure zigbee2mqtt is enabled and started | ||||
|   become: true | ||||
|   ansible.builtin.systemd: | ||||
|     service: zigbee2mqtt | ||||
|     enabled: true | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue