WIP
This commit is contained in:
parent
98448e56ff
commit
79b7ff8241
12 changed files with 318 additions and 205 deletions
|
|
@ -24,25 +24,29 @@
|
|||
owner: "{{ user }}"
|
||||
mode: u=rw,g=,o=
|
||||
|
||||
- name: Create temporary build directory
|
||||
- delegate_to: localhost
|
||||
ansible.builtin.tempfile:
|
||||
state: directory
|
||||
suffix: ssh_known_hosts
|
||||
register: tempdir_known_hosts
|
||||
|
||||
- name: Load known hosts from profiles
|
||||
delegate_to: localhost
|
||||
template:
|
||||
# load from controller host
|
||||
src: "{{ home }}/.dots/profiles/{{ item.name }}/configs/ssh/known_hosts"
|
||||
# load from controller host, from the work profile repository
|
||||
src: "{{ profiles_paths[item.name] }}/configs/ssh/known_hosts"
|
||||
dest: "{{ tempdir_known_hosts.path }}/{{ item.name }}"
|
||||
with_items: "{{ enabled_profiles }}"
|
||||
|
||||
# - name: Execute a command
|
||||
# ansible.builtin.command: "sleep infinity"
|
||||
|
||||
- name: Concat known hosts
|
||||
template:
|
||||
src: ssh/known_hosts
|
||||
dest: "{{ home }}/.ssh/known_hosts"
|
||||
vars:
|
||||
tempdir_known_hosts: "{{ tempdir_known_hosts }}"
|
||||
origin_dir: "{{ tempdir_known_hosts.path }}"
|
||||
|
||||
- name: Ensure ssh config profiles dir exists
|
||||
file:
|
||||
|
|
@ -51,7 +55,7 @@
|
|||
|
||||
- name: Load ssh config of profiles
|
||||
template:
|
||||
src: "{{ home }}/.dots/profiles/{{ item.name }}/configs/ssh/config"
|
||||
src: "{{ profiles_paths[item.name] }}/configs/ssh/config"
|
||||
dest: "{{ home }}/.ssh/profiles/{{ item.name }}"
|
||||
mode: u=rw,g=,o=
|
||||
with_items: "{{ enabled_profiles }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue