Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 'Check if /etc/kubernetes/admin.conf file exists' fails when kubernetes_master.count = 0 #1183

Closed
to-bar opened this issue Apr 22, 2020 · 1 comment · Fixed by #1346
Closed
Assignees
Labels

Comments

@to-bar
Copy link
Contributor

to-bar commented Apr 22, 2020

Repro steps:

  1. In data.yml:
    kubernetes_master:
      count: 0
      machine: kubernetes-master-machine
  1. Run epicli apply:
16:51:47 INFO cli.engine.ansible.AnsibleCommand - TASK [preflight_facts : Check if /etc/kubernetes/admin.conf file exists] *******************************************************************
16:51:47 INFO cli.engine.ansible.AnsibleCommand - fatal: [ec2-3-93-15-67.compute-1.amazonaws.com]: FAILED! => {"msg": "The conditional check 'inventory_hostname in groups.kubernetes_master' failed. The error was: error while evaluating conditional (inventory_hostname in groups.kubernetes_master): Unable to look up a name or access an attribute in template string ({% if inventory_hostname in groups.kubernetes_master %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable\n\nThe error appears to be in '/workspaces/epiphany/core/src/epicli/clusters/build/small-test-ubu/ansible/roles/preflight_facts/tasks/kubernetes.yml': line 4, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n    - name: Check if /etc/kubernetes/admin.conf file exists\n      ^ here\n"}
16:51:47 INFO cli.engine.ansible.AnsibleCommand - fatal: [ec2-174-129-166-186.compute-1.amazonaws.com]: FAILED! => {"msg": "The conditional check 'inventory_hostname in groups.kubernetes_master' failed. The error was: error while evaluating conditional (inventory_hostname in groups.kubernetes_master): Unable to look up a name or access an attribute in template string ({% if inventory_hostname in groups.kubernetes_master %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable\n\nThe error appears to be in '/workspaces/epiphany/core/src/epicli/clusters/build/small-test-ubu/ansible/roles/preflight_facts/tasks/kubernetes.yml': line 4, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n    - name: Check if /etc/kubernetes/admin.conf file exists\n      ^ here\n"}
@sk4zuzu
Copy link
Contributor

sk4zuzu commented Jun 10, 2020

Please note, that two more issues #1349 and #1350 have been discovered in addition to this regression problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants