Removed import of task meant to be done via non-root user with privilege escalation
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
loop: "{{ create_users[1:] }}"
|
||||
tags:
|
||||
- other_users
|
||||
register: created_user
|
||||
register: created_users
|
||||
- name: Specify authorized SSH keys for users based on local public keys
|
||||
when: not files_mode and ansible_facts["user_id"] == "root"
|
||||
block:
|
||||
@@ -87,7 +87,7 @@
|
||||
tags:
|
||||
- other_users
|
||||
- others_ssh
|
||||
loop: "{{ created_user }}"
|
||||
loop: "{{ created_users.results }}"
|
||||
register: authorized_ssh_pubkeys
|
||||
- name: Specify authorized SSH keys for users
|
||||
when: files_mode and ansible_facts["user_id"] == "root"
|
||||
@@ -118,7 +118,7 @@
|
||||
tags:
|
||||
- other_users
|
||||
- others_ssh
|
||||
loop: "{{ created_user }}"
|
||||
loop: "{{ created_users.results }}"
|
||||
register: authorized_ssh_pubkeys
|
||||
- name: Lock down root SSH access
|
||||
when: ansible_facts["user_id"] == "root"
|
||||
@@ -154,7 +154,4 @@
|
||||
tags:
|
||||
- default
|
||||
- deroot
|
||||
notify: "restart ssh"
|
||||
- name: Import disabling of shell root by sys-admin user
|
||||
ansible.builtin.import_tasks:
|
||||
file: ./deshell.yml
|
||||
notify: "restart ssh"
|
Reference in New Issue
Block a user