ansible-infra/playbooks/roles/esphome/tasks/main.yaml
yuri 33d1cfca1f
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
2023-05-10 18:02:10 +02:00

41 lines
1 KiB
YAML

- name: Ensure acl is installed
become: true
ansible.builtin.apt:
name: acl
- name: Ensure pip is installed
become: true
ansible.builtin.apt:
name: python3-pip
- name: Ensure esphome user exists
become: true
ansible.builtin.user:
name: esphome
shell: /bin/bash
- name: Ensure esphome dependencies are installed
become: true
become_user: esphome
ansible.builtin.pip:
name: tornado
extra_args: --user
- name: Ensure esphome is installed
become: true
become_user: esphome
ansible.builtin.pip:
name: "esphome=={{ esphome__version }}"
extra_args: --user
notify: Restart esphome
- name: Ensure esphome systemd service file is deployed
become: true
ansible.builtin.copy:
src: esphome.service
dest: /etc/systemd/system/esphome.service
mode: "644"
owner: root
group: root
notify: Restart esphome
- name: Ensure esphome service is enabled and started
become: true
ansible.builtin.systemd:
service: esphome.service
enabled: true
state: started