Using shell module and referencing the variable in a playbook

I am running a bash script and one of the lines is :

conf_file=“xxxxx.conf”

The config file simply has a variable such as:

screen_url:http://www.yahoo.com

The problem is that with multiple machines you would need multiple versions of the script. So the solution is to set the variable or load the config in a playbook.

So I included the following before running the task and shell module:

vars_files:

  • /etc/ansible/url/xxxx.yml

Removed the config file line in the script and ran the playbook. It does not work for some reason, any ideas?

Also when I run the script with a playbook it runs everything fine but it never finishes, I have to ctrl-z and bg.

Guess those are the two questions any help will be gladly appreciated!

Thanks!

Emil