test other version
Some checks failed
Ansible Minecraft CI/CD Pipeline / Ansible Lint Check (push) Successful in 58s
Ansible Minecraft CI/CD Pipeline / Project Structure Validation (push) Failing after 3s
Ansible Minecraft CI/CD Pipeline / Security Scan (push) Successful in 4s
Ansible Minecraft CI/CD Pipeline / Deploy to Staging (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Deploy to Production (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Backup System Check (push) Has been skipped
Some checks failed
Ansible Minecraft CI/CD Pipeline / Ansible Lint Check (push) Successful in 58s
Ansible Minecraft CI/CD Pipeline / Project Structure Validation (push) Failing after 3s
Ansible Minecraft CI/CD Pipeline / Security Scan (push) Successful in 4s
Ansible Minecraft CI/CD Pipeline / Deploy to Staging (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Deploy to Production (push) Has been skipped
Ansible Minecraft CI/CD Pipeline / Backup System Check (push) Has been skipped
This commit is contained in:
16
roles/05-update/tasks/01-update-ssh-keys.yml
Normal file
16
roles/05-update/tasks/01-update-ssh-keys.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Check for new SSH keys to add
|
||||
ansible.posix.authorized_key:
|
||||
user: ansible
|
||||
key: "{{ item.key }}"
|
||||
comment: "{{ item.comment | default('') }}"
|
||||
state: present
|
||||
loop: "{{ admin_users }}"
|
||||
when: admin_users is defined and admin_users | length > 0
|
||||
notify: "reload ssh service"
|
||||
register: ssh_keys_result
|
||||
|
||||
- name: Log SSH keys update
|
||||
ansible.builtin.debug:
|
||||
msg: "SSH keys updated for {{ ssh_keys_result.results | selectattr('changed', 'equalto', true) | list | length }} users"
|
||||
when: ssh_keys_result is defined
|
Reference in New Issue
Block a user