playbook_distribute_authorized_keys: also set root pw on gw and aps
This commit is contained in:
parent
836436e625
commit
c4b282d7fb
|
@ -5,6 +5,13 @@
|
||||||
- accesspoints
|
- accesspoints
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
tasks:
|
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
|
- name: deploy authorized_keys
|
||||||
copy:
|
copy:
|
||||||
src: files/authorized_keys
|
src: files/authorized_keys
|
||||||
|
|
Reference in New Issue