Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
breaking change to dropbear key handling
Browse files Browse the repository at this point in the history
openwrt_dropbkear_keys
-> openwrt_dropbear_keyshost
-> openwrt_dropbear_keysgroup
see https://wiki.junicast.de/de/junicast/docs/AnsibleOpenWrtCollection/RolleDropbear
  • Loading branch information
imp1sh committed Oct 19, 2022
1 parent 5be78ba commit e48d959
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/ansible_openwrtdropbear/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
# tasks file for ansible_openwrtdropbear
- name: merge keys from group and host definitions
include_tasks: merge.yml
- name: make sure deploypath config exists
ansible.builtin.file:
path: "{{ openwrt_dropbear_deploypath }}"
Expand Down
8 changes: 8 additions & 0 deletions roles/ansible_openwrtdropbear/tasks/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Merge keys
- name: merge group keys
ansible.builtin.set_fact:
openwrt_dropbear_keysmergedgroup: "{{ openwrt_dropbear_keysgroup.keys() | list | intersect(group_names) | map('extract', openwrt_dropbear_keysgroup) | combine }}"
when: openwrt_dropbear_keysgroup is defined
- name: combine all keys into openwrt_dropbear_keys
ansible.builtin.set_fact:
openwrt_dropbear_keys: "{{ openwrt_dropbear_keyshost | default([]) + openwrt_dropbear_keysmergedgroup | default([]) }}"

0 comments on commit e48d959

Please sign in to comment.