Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save smarterclayton/78691c6cd2211755a17186ba1a38a8dc to your computer and use it in GitHub Desktop.
Save smarterclayton/78691c6cd2211755a17186ba1a38a8dc to your computer and use it in GitHub Desktop.
- hosts: localhost
tasks:
- stat: path=/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/std_include.yml
register: std_include
become: no
- include: /usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/std_include.yml
when: hostvars['localhost']['std_include'] is defined and hostvars['localhost']['std_include'].exists
@smarterclayton
Copy link
Author

And

    "msg": "The conditional check 'hostvars['localhost']['std_include'].exists' failed. The error was: error while evaluating conditional (hostvars['localhost']['std_include'].exists): 'dict object' has no attribute 'exists'\n\nThe error appears to have been in '/usr/share/ansible/openshift-ansible/playbooks/common/openshift-cluster/evaluate_groups.yml': line 8, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  tasks:\n  - name: Evaluate groups - g_etcd_hosts or g_new_etcd_hosts required\n    ^ here\n"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment