Grant all members of NOC access to ctf.realraum.at
[noc.git] / ansible / roles / localconfig / tasks / main.yml
1 ---
2 - name: load additional config from .ssh dir
3   include_vars:
4     dir: "{{ '~/.ssh' | expanduser }}"
5     depth: 1
6     files_matching: 'r3_localconfig.yml'
7
8 - name: create .ssh/config.d
9   file:
10     path: "~/.ssh/config.d/"
11     state: directory
12
13 - name: install generated ssh config snippets
14   with_fileglob:
15     - "../templates/ssh/*.conf.j2"
16   template:
17     src: "ssh/{{ item | basename }}"
18     dest: "~/.ssh/config.d/{{ item | basename | regex_replace('^(.*)\\.j2$', '\\1') }}"
19
20 - name: install static ssh config snippets
21   copy:
22     src: ssh/
23     dest: ~/.ssh/config.d/
24
25 - name: assemble ssh config
26   assemble:
27     src: ~/.ssh/config.d/
28     regexp: "\\.conf$"
29     dest: ~/.ssh/config
30   when: localconfig_overwrite_ssh_config | bool