added check for whether administrative or root login used
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
#SPDX-License-Identifier: MIT-0
|
#SPDX-License-Identifier: MIT-0
|
||||||
---
|
---
|
||||||
# tasks file for roles/init-vps
|
# tasks file for roles/init-vps
|
||||||
# - name: Checking whether administrative or root login used
|
- 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"
|
when: ansible_facts["user_id"] not in (admins | map(attribute="username") | list) or ansible_facts["user_id"] != "root"
|
||||||
# ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
# msg: Must use administrative or root user for subsequent tasks
|
msg: Must use administrative or root user for subsequent tasks
|
||||||
- name: Starting user and group creation for SSH access
|
- name: Starting user and group creation for SSH access
|
||||||
block:
|
block:
|
||||||
- name: Creating group remote for managing SSH access
|
- name: Creating group remote for managing SSH access
|
||||||
|
|||||||
Reference in New Issue
Block a user