Removed import of task meant to be done via non-root user with privilege escalation

This commit is contained in:
Alex Tavarez
2025-09-05 12:30:01 -04:00
parent 46b3a7ef2e
commit 2b45211ac0

View File

@@ -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"
@@ -155,6 +155,3 @@
- default
- deroot
notify: "restart ssh"
- name: Import disabling of shell root by sys-admin user
ansible.builtin.import_tasks:
file: ./deshell.yml