From c4b282d7fb0d09fae9aee6b781371c03034e2a51 Mon Sep 17 00:00:00 2001 From: Gregor Michels Date: Wed, 28 Sep 2022 00:47:14 +0200 Subject: [PATCH] playbook_distribute_authorized_keys: also set root pw on gw and aps --- playbook_distribute_authorized_keys.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/playbook_distribute_authorized_keys.yml b/playbook_distribute_authorized_keys.yml index 2821776..b52c070 100644 --- a/playbook_distribute_authorized_keys.yml +++ b/playbook_distribute_authorized_keys.yml @@ -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