From c45946739e29c673f5b26ee93592cafd2adea4fe Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Wed, 27 May 2026 13:14:14 -0400 Subject: [PATCH] added check for whether administrative or root login used --- roles/init-server/tasks/ssh-users.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/init-server/tasks/ssh-users.yml b/roles/init-server/tasks/ssh-users.yml index f4784ed..4cb77fd 100644 --- a/roles/init-server/tasks/ssh-users.yml +++ b/roles/init-server/tasks/ssh-users.yml @@ -1,10 +1,10 @@ #SPDX-License-Identifier: MIT-0 --- # tasks file for roles/init-vps -# - name: Checking whether administrative or root login used -# when: ansible_facts["user_id"] not in (admins | map(attribute="username") | list) or ansible_facts["user_id"] != "root" -# ansible.builtin.fail: -# msg: Must use administrative or root user for subsequent tasks +- name: Checking whether administrative or root login used + when: ansible_facts["user_id"] not in (admins | map(attribute="username") | list) or ansible_facts["user_id"] != "root" + ansible.builtin.fail: + msg: Must use administrative or root user for subsequent tasks - name: Starting user and group creation for SSH access block: - name: Creating group remote for managing SSH access