added task checking for administrative login use
This commit is contained in:
@@ -1,6 +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 login used
|
||||||
|
when: ansible_facts["user_id"] not in (admins | map(attribute="username") | list)
|
||||||
|
ansible.builtin.fail:
|
||||||
|
msg: Must use administrative user for subsequent tasks
|
||||||
- name: Creating prerequisite directory tree
|
- name: Creating prerequisite directory tree
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ ansible_facts['user_dir'] }}/.local/bin"
|
path: "{{ ansible_facts['user_dir'] }}/.local/bin"
|
||||||
|
|||||||
Reference in New Issue
Block a user