Hi All,
I want to create Ansible script which will create user on linux servers, so
I use vars_propt for entering values of username, groupname, shell. For
groupname variable I want to use username's value as a default value, but
when I wrote default: {{username}} in my script I got syntax error, (I
tried to write default: "{{username}}" , default: '{{username}}' but in
this cases script doesn't understand that this is variable.
- hosts: servers
vars_prompt:
- name: "username"
prompt: "Enter new username"
private: no
- name: "groupname"
prompt: "Please enter group name for user"
private: no
default: {{username}}
- name: "usershell"
prompt: "Please enter shell name for user"
private: no
default: "/bin/bash"
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/070bfe36-bd82-4ea1-850b-9940f793a37e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.