Uncomment things from update-hosts.yml
[public/csc-playbooks.git] / distribute-ssh-config.yml
1 ---
2 - hosts: all
3   gather_facts: no
4   remote_user: root
5   tasks:
6      - name: generate ed25519 key
7        shell: ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -N '' < /dev/null
8        args:
9          creates: /etc/ssh/ssh_host_ed25519_key
10      - name: copy ssh config
11        copy: src={{ item.src }} dest={{ item.dest }} backup=yes
12        with_items:
13          - { src: 'files/ssh_config', dest: '/etc/ssh/ssh_config' }
14          - { src: 'files/sshd_config', dest: '/etc/ssh/sshd_config' }
15      - name: restart sshd
16        service: name=ssh state=restarted