Skip to content

Instantly share code, notes, and snippets.

@logan2211
Last active January 25, 2018 21:16
Show Gist options
  • Save logan2211/f70c891173a2a1f00b65ca12753881f8 to your computer and use it in GitHub Desktop.
Save logan2211/f70c891173a2a1f00b65ca12753881f8 to your computer and use it in GitHub Desktop.
test playbook
PLAY [localhost] ********************************************************************************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************************************************************
ok: [localhost]
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": " false "
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": " True "
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": " True "
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": " False "
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": " True "
}
keystone_service_adminuri_insecure: |-
{% set _insecure = false %}
{% if keystone_service_adminuri_proto == 'https' %}
{% set _insecure = not (keystone_user_ssl_cert is defined or haproxy_user_ssl_cert is defined) %}
{% endif %}
{{ _insecure }}
generates:
PLAY [localhost] ********************************************************************************************************************************************************************
TASK [Gathering Facts] **************************************************************************************************************************************************************
ok: [localhost]
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": false
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": false
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": false
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": true
}
TASK [debug] ************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": false
}
- hosts: localhost
vars_files:
- vars.yml
tasks:
- debug:
msg: "{{ keystone_service_adminuri_insecure }}"
vars:
keystone_service_adminuri_proto: http
- debug:
msg: "{{ keystone_service_adminuri_insecure }}"
vars:
keystone_service_adminuri_proto: https
keystone_user_ssl_cert: bla
- debug:
msg: "{{ keystone_service_adminuri_insecure }}"
vars:
keystone_service_adminuri_proto: https
haproxy_user_ssl_cert: bla
- debug:
msg: "{{ keystone_service_adminuri_insecure }}"
vars:
keystone_service_adminuri_proto: https
- debug:
msg: "{{ keystone_service_adminuri_insecure }}"
vars:
keystone_service_adminuri_proto: https
keystone_user_ssl_cert: bla
haproxy_user_ssl_cert: bla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment