ovh: Fix handler to restart SSH
This commit is contained in:
parent
ea27d48a2f
commit
6a5092ce31
1 changed files with 8 additions and 7 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
backup: true
|
backup: true
|
||||||
become: true
|
become: true
|
||||||
notify:
|
notify:
|
||||||
- restart ssh
|
- Restart SSH
|
||||||
- name: Update authorized SSH keys for Ansible user
|
- name: Update authorized SSH keys for Ansible user
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: '/home/{{ ansible_user }}/.ssh/authorized_keys'
|
dest: '/home/{{ ansible_user }}/.ssh/authorized_keys'
|
||||||
|
|
@ -23,6 +23,13 @@
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEmkV9arotms79lJPsLHkdzAac4eu3pYS08ym0sB/on qenya@tohru
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJEmkV9arotms79lJPsLHkdzAac4eu3pYS08ym0sB/on qenya@tohru
|
||||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjBuuxo+w3yED0aPnsNb8S90p/GgBqFEG9K4ETZ5Wkq qenya@kilgharrah
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFjBuuxo+w3yED0aPnsNb8S90p/GgBqFEG9K4ETZ5Wkq qenya@kilgharrah
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
|
||||||
|
handlers:
|
||||||
|
- name: Restart SSH
|
||||||
|
ansible.builtin.service:
|
||||||
|
name: sshd
|
||||||
|
state: restarted
|
||||||
|
|
||||||
- name: Enable automatic upgrades
|
- name: Enable automatic upgrades
|
||||||
hosts: ovh
|
hosts: ovh
|
||||||
tasks:
|
tasks:
|
||||||
|
|
@ -46,9 +53,3 @@
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
handlers:
|
|
||||||
- name: Restart SSH
|
|
||||||
ansible.builtin.service:
|
|
||||||
name: sshd
|
|
||||||
state: restarted
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue