Answer the question
In order to leave comments, you need to log in
How to correctly pass a string to --extra-vars Ansible?
Using a PHP script, I pass an argument to the Playbook Ansible as follows
foreach ($all as $k => $v) {
$title = $v['title'];
--------------------------
passthru("ansible-playbook -i /home/vagrant/inventory.ini /home/vagrant/add.yml --tags $cms --extra-vars 'username=$userName userpass=$userPass mysql_user_pass=$mysqlPass domain=$domain title=$title'");
$sitename = 'Тестовый';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question