workstation/tasks/main.yml

56 lines
1.5 KiB
YAML
Raw Normal View History

2019-04-10 18:26:02 +00:00
- name: install workstation wm soft
pacman:
state: present # not required. choices: absent;latest;present. Desired state of the package.
name: "{{ workstation_wm_soft }}" # not required. Name or list of names of the packages to install, upgrade, or remove.
become: yes
register: wm
- name: install workstation base soft
pacman:
state: present # not required. choices: absent;latest;present. Desired state of the package.
name: "{{ workstation_base_soft }}" # not required. Name or list of names of the packages to install, upgrade, or remove.
become: yes
register: base
- name: install aur workstation soft
aur:
name: "{{ workstation_aur_soft }}"
skip_installed: yes
#chech graphic card
- name: debug
debug:
2020-05-18 08:34:14 +00:00
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