add hass client control
This commit is contained in:
parent
9812024ad4
commit
5b4a04811e
@ -20,36 +20,10 @@
|
|||||||
- name: install aur workstation soft
|
- name: install aur workstation soft
|
||||||
aur:
|
aur:
|
||||||
name: "{{ workstation_aur_soft }}"
|
name: "{{ workstation_aur_soft }}"
|
||||||
skip_installed: yes
|
state: present
|
||||||
|
|
||||||
#chech graphic card
|
#chech graphic card
|
||||||
- name: debug
|
- name: debug
|
||||||
debug:
|
debug:
|
||||||
msg: "{{ wm }} {{base}}"
|
msg: "{{ wm }} {{base}}"
|
||||||
|
|
||||||
|
|
||||||
# need to send commande since home assistant
|
|
||||||
- name: create hass user
|
|
||||||
become: yes
|
|
||||||
user:
|
|
||||||
name: "hass" # required. Name of the user to create, remove or modify.
|
|
||||||
create_home: yes
|
|
||||||
state: present # not required. choices: absent;present. Whether the account should exist or not, taking action if the state is different from what is stated.
|
|
||||||
comment: "Home Assistant service user"
|
|
||||||
|
|
||||||
|
|
||||||
- name: add hass public key
|
|
||||||
authorized_key:
|
|
||||||
user: "hass"
|
|
||||||
key: "{{ hass_public_key }}"
|
|
||||||
exclusive: true
|
|
||||||
become: yes
|
|
||||||
|
|
||||||
|
|
||||||
- name: Allow hass to run shutdown as root
|
|
||||||
lineinfile:
|
|
||||||
path: /etc/sudoers.d/12-hass-service
|
|
||||||
line: 'hass ALL=(ALL) NOPASSWD: /usr/bin/shutdown'
|
|
||||||
create: yes
|
|
||||||
validate: 'visudo -cf %s'
|
|
||||||
become: yes
|
|
||||||
|
Loading…
Reference in New Issue
Block a user