aboutsummaryrefslogblamecommitdiffstats
path: root/roles/sshd/tasks/main.yml
blob: df5d8451f77447619eec58e11c94feee021b0d6e (plain) (tree)
1
2
3
4
5
6
7
8
9
10

   
                                   
                           





                              
                                         
                                                     
 
                               
                          




                            
                           
                              

                  
---

- name: generate sshd configuration
  ansible.builtin.template:
    src: sshd_config.j2
    dest: /etc/ssh/sshd_config
    owner: 0
    group: 0
    mode: 0644

- name: include key synchronization tasks
  ansible.builtin.include_tasks: synchronize_keys.yml

- name: enable and restart sshd
  ansible.builtin.service:
    name: sshd
    state: restarted
    enabled: true

- name: check ssh connection
  ansible.builtin.wait_for:
    port: "{{ ansible_port }}"
    delay: 1
    state: started
remember that computers suck.