Browse Source

ssh-keys: remove old keys after adding new keys to avoid connection problem :')

master
victor héry 6 years ago
parent
commit
cc54e326bb
1 changed files with 7 additions and 7 deletions
  1. +7
    -7
      roles/ssh-keys/tasks/main.yml

+ 7
- 7
roles/ssh-keys/tasks/main.yml View File

@ -16,19 +16,19 @@
state: installed
when: ansible_distribution == 'CentOS'
- name: Remove old SSH keys
- name: Deploy SSH keys
tags: ssh_keys
authorized_key:
user: root
key: "{{ item.value }}"
state: absent
with_dict: "{{ admin_blacklist_ssh_keys }}"
when: admin_blacklist_ssh_keys is defined
state: present
with_dict: "{{ admin_ssh_keys }}"
- name: Deploy SSH keys
- name: Remove old SSH keys
tags: ssh_keys
authorized_key:
user: root
key: "{{ item.value }}"
state: present
with_dict: "{{ admin_ssh_keys }}"
state: absent
with_dict: "{{ admin_blacklist_ssh_keys }}"
when: admin_blacklist_ssh_keys is defined

Loading…
Cancel
Save