ansible-role-apache: need clarification on parsing variables while runtime
SheikHussain opened this issue · 3 comments
I want to be passed the below variables values for defaults/main.yml while executing the playbook. I want to call the variables for servername/documentroot/certificate_file/certificate_key variables by passing them while executing playbook. I tried something like this below
apache_vhosts:
Additional properties:
'serveradmin, serveralias, allow_override, options, extra_parameters'.
- servername: "{{ server-var }}"
documentroot: "{{ doc-var }}"
apache_vhosts_ssl: []
Additional properties:
'serveradmin, serveralias, allow_override, options, extra_parameters'.
- servername: "{{ server-var }} ",
documentroot: "{{ doc-var }}",
certificate_file: "{{ cert-var-file }}",
certificate_key_file: "{{cert-var-key}}"
i have created the variables for the above in default/main.yml instead of static values and trying to fetch the dynamic values everytime when i run playbook. getting syntax errors.
any suggestions to achieve this scenario
please find the below block of code which i'm trying,
apache_vhosts:
servername: "{{ server-var }}"
documentroot: "{{ doc-var }}"
apache_vhosts_ssl: []
servername: "{{ server-var }} ",
documentroot: "{{ doc-var }}",
certificate_file: "{{ cert-var-file }}",
certificate_key_file: "{{cert-var-key}}"
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.