added check for whether administrative or root login used
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user