playbook_distribute_authorized_keys: also set root pw on gw and aps

replace_gw-core01
Gregor Michels 2022-09-28 00:47:14 +02:00
parent 836436e625
commit c4b282d7fb
1 changed files with 7 additions and 0 deletions

View File

@ -5,6 +5,13 @@
- accesspoints
gather_facts: no
tasks:
- name: set root password
user:
name: root
# https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#hash-filters
# using md5 because that is the only? supported hash type for busybox on openwrt 21.03
password: "{{ lookup('passwordstore', '{{ group_names | first }}/{{ inventory_hostname }}') | password_hash('md5', 65534 | random(seed=inventory_hostname) | string) }}"
- name: deploy authorized_keys
copy:
src: files/authorized_keys