ansible / ansible/role-install-gcloud
invalid variable name
- Dominant language
- Shell
- Stars
- 23
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
EDIT: this is fixed in https://github.com/ansible/role-install-gcloud/pull/1
gcloud_archive_name: google-cloud-sdk-114.0.0-darwin-x86_64.tar.gz
using dashes throws an error in ansible, see https://github.com/ansible/ansible/issues/3907
Error thrown when running playbook:
fatal: [localhost]: FAILED! => {"failed": true, "msg": "The conditional check 'gcloud_archive_name' failed. The error was: error while evaluating conditional (gcloud_archive_name): Unable to look up a name or access an attribute in template string ({% if google-cloud-sdk-149.0.0-linux-x86_64.tar.gz %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': unsupported operand type(s) for -: 'StrictUndefined' and 'StrictUndefined'\n\nThe error appears to have been in '/root/codi-ansible/roles/provision-gcloud/tasks/main.yml': line 10, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n#\n- name: Download the archive\n ^ here\n"}
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with roles/provision-gcloud/tasks/main.yml at the reported line 10 and review the gcloud_archive_name variable and the failing playbook output. Done means the archive variable uses valid characters and the playbook no longer raises the conditional error; the issue notes this is already fixed in pull request #1.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ansible, google-cloud, shell
- Domain
- cli, cloud, devops
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 20/100