blob: e3be4888708fc80589a911f602f1b5017b849c4c (
plain) (
tree)
|
|
---
- name: get current user
shell: whoami
register: result
- name: set current user
set_fact:
sshdns_user: '{{ result.stdout_lines[0] }}'
- name: create config directory
file:
path: '/home/{{ sshdns_user }}/.ssh/config.d'
state: directory
group: '{{ sshdns_user }}'
owner: '{{ sshdns_user }}'
mode: '0700'
- name: generate template to localhost
template:
src: templates/sshdns.j2
dest: '/home/{{ sshdns_user }}//.ssh/config.d/dns.config'
owner: '{{ sshdns_user }}'
group: '{{ sshdns_user }}'
mode: '0600'
|