Назад | Перейти на главную страницу

Использовать переменную вместо пароля в виде обычного текста в Groovy-Ansible

Мой main.groovy содержит

                ansiblePlaybook(
                        installation: 'ansible27',
                        colorized: true,
                        inventory: "inventories/${env.Stand}/hosts",
                        playbook: 'site.yml',
                        extras: " ${ansible_log_level} --ssh-extra-args='-o StrictHostKeyChecking=no' ",
                        extraVars: [
                                nginxUser : "${env.DEV_NGINX_USER}",
                                nginxPass : "${env.DEV_NGINX_PASS}",
                                stand :  "${Stand}"
                        ]
                )

С файлом hosts, содержащим код ниже, я могу подключиться к серверу

[master]
192.168.1.10 ansible_connection=ssh ansible_ssh_user=my_user ansible_ssh_pass=my_password

Как мне заменить my_user с участием ${env.DEV_NGINX_USER} и my_password с участием ${env.DEV_NGINX_PASS} в файле hosts?