aboutsummaryrefslogblamecommitdiffstats
path: root/roles/sshdns/tasks/main.yml
blob: f62c706c6176a74003f77cc87425543ac5c82f05 (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/ssh_dns'
    owner: '{{ sshdns_user }}'
    group: '{{ sshdns_user }}'
    mode: '0600'
remember that computers suck.