add create ssh config script

This commit is contained in:
2026-02-03 18:49:15 -06:00
parent 7046191ef1
commit 332f7bf983
3 changed files with 70 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
- hosts: localhost
connection: local
gather_facts: false
vars:
include_path: ~/.ssh/config.d/codemonkey.config
tasks:
- name: Include ssh config dir
lineinfile:
path: ~/.ssh/config
line: Include ~/.ssh/config.d/*
state: present
insertbefore: BOF
- name: ensure ssh config dir exists
file:
path: ~/.ssh/config.d
state: directory
- name: Creating local SSH config files
template:
lstrip_blocks: true
src: create_ssh_config.j2
dest: "{{ include_path }}"
mode: 0644