diff options
| author | boom2 <blizzack@blizzack.com> | 2023-12-21 15:49:16 -0500 |
|---|---|---|
| committer | boom2 <blizzack@blizzack.com> | 2023-12-21 15:49:16 -0500 |
| commit | 200680e7c8cbd6b4426c3ce232568b1e06446bde (patch) | |
| tree | b122f103cc4dce8cea078c20dac107612399640e /ansible-practice/system/14-verify-user.yml | |
| parent | a21b2f4bb64bd0f633d8a6a15f27a73103df70c0 (diff) | |
- renamed playbook to follow convention
-- add /etc/rc.d/rc.M in 'fetch file playbook' for future clamav playbook
Diffstat (limited to 'ansible-practice/system/14-verify-user.yml')
| -rw-r--r-- | ansible-practice/system/14-verify-user.yml | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/ansible-practice/system/14-verify-user.yml b/ansible-practice/system/14-verify-user.yml deleted file mode 100644 index f617843..0000000 --- a/ansible-practice/system/14-verify-user.yml +++ /dev/null @@ -1,31 +0,0 @@ -# -# https://www.howtouselinux.com/post/create-user-with-ansible -# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/user_module.html -# https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html -# ---- -- name: "14 - custom ansible - verify user" - hosts: dev - become: yes # Run tasks with root/sudo privileges - vars: - username: testuser1 - - tasks: - - name: check if user exists - ansible.builtin.command: id {{ username }} -# ansible.builtin.shell: id {{ username }} - register: user_check - ignore_errors: true - - - name: display user information - ansible.builtin.debug: - msg: user '{{ username }}' exists ! - when: user_check.rc == 0 - tags: ['user_exists'] - - - name: display error message if user does not exist - ansible.builtin.debug: - msg: user '{{ username }}' does not exist ! - when: user_check.rc != 0 - tags: ['user_does_not_exist'] - |
