Hi All,
I want to refer user defined ansible variables inside a shell script. Can anyone help me how to accomplish this ? For example, for the below code:
Hi All,
I want to refer user defined ansible variables inside a shell script. Can anyone help me how to accomplish this ? For example, for the below code:
You can try
Yaml
Shell script
#!/bin/bash
echo “Script variable 1: $script_var1”
echo “Script variable 2: $script_var2”
I am trying this:
This is the second message you have sent to this list asking for help with using Ansible when that’s not what this list is for, after I (and perhaps others) emailed you privately and politely pointed out you were on the wrong list and pointed you at the correct forums for Ansible usage questions. Please respect the members of this list and do not continue to seek Ansible usage help here.
The previous answer you were given is not correct. Please see https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_environment.html.