Update playbook to ask for names of user and group

This commit is contained in:
2023-11-19 16:53:22 +05:30
parent 979147e6f4
commit f0a045d650

View File

@@ -1,9 +1,16 @@
---
- hosts: all
become: true
vars_prompt:
- name: group_name
prompt: "Name of group to add user to"
private: no
- name: user_name
prompt: "Name of user to add to group"
private: no
tasks:
- name: Add user to group
user:
name: akshun
groups: docker
name: "{{ user_name }}"
groups: "{{ group_name }}"
append: yes