Ansible: variable interpolation in task name

Variables are not resolved inside the name. Only inside the actual tasks/conditions etc. the placeholders will be resolved. I guess this is by design. Imagine you have a with_items loop and use the {{ item }}in the name. The tasks name will only be printed once, but the {{ item }} would change in every … Read more

How to set environmental variables using Ansible

Yes, there is a cleaner way. You can set environment variables per task: tasks: – shell: echo JAVA_HOME is $JAVA_HOME environment: JAVA_HOME: /usr/java/jre1.8.0_51 register: shellout – debug: var=shellout Output: TASK: [shell echo JAVA_HOME is $JAVA_HOME] ********************************** changed: [localhost] TASK: [debug var=shellout] **************************************************** ok: [localhost] => { “var”: { “shellout”: { “changed”: true, “cmd”: “echo JAVA_HOME … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)