added check for whether administrative or root login used

This commit is contained in:
2026-05-27 13:14:14 -04:00
parent 4c9a4d480e
commit c45946739e

View File

@@ -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