netz39-infra-ansible/setup-ssh.yml
Alexander Dahl 54426e75aa 🚨 Fix new-line-at-end-of-file warnings
yamllint warned:

setup-ssh.yml
  24:29     error    no new line character at the end of file  (new-line-at-end-of-file)

host_vars/pottwal.n39.eu/vars.yml
  41:61     error    no new line character at the end of file  (new-line-at-end-of-file)

host_vars/unicorn.n39.eu/vars.yml
  1:40      error    no new line character at the end of file  (new-line-at-end-of-file)
2022-11-18 08:50:33 +01:00

24 lines
771 B
YAML

---
- name: configure local ssh to access n39 hosts
hosts: localhost
tasks:
- name: ensure {{ lookup('env', 'HOME') }}/.ssh/config.d/ dir is present
ansible.builtin.file:
path: "{{ lookup('env', 'HOME') }}/.ssh/config.d/"
state: directory
delegate_to: localhost
- name: template ssh config for access to internal systems
ansible.builtin.template:
src: templates/ssh_config.j2
dest: "{{ lookup('env', 'HOME') }}/.ssh/config.d/n39_config"
delegate_to: localhost
- name: ensure that n39 access config is included
ansible.builtin.lineinfile:
path: ~/.ssh/config
insertbefore: BOF
regexp: '^Include'
line: Include config.d/n39_config
delegate_to: localhost