ansible-lint reads like this: name[casing]: All names should start with an uppercase letter. While at it: Some task/handler names were slightly adapted to better match what should be done.
24 lines
779 B
YAML
24 lines
779 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: Put ssh config for access to n39 internal systems in place
|
|
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
|