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

Role environment - debops v3.0.5 - type error bool instead of str #2431

Open
JeGoi opened this issue Oct 5, 2023 · 0 comments
Open

Role environment - debops v3.0.5 - type error bool instead of str #2431

JeGoi opened this issue Oct 5, 2023 · 0 comments

Comments

@JeGoi
Copy link

JeGoi commented Oct 5, 2023

ansible version

$ ansible --version
ansible [core 2.15.4]
  config file = None
  configured module search path = ['./.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.10/dist-packages/ansible
  ansible collection location = ./.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

debops version

Installing 'debops.debops:3.0.5' to './ansible_collections/debops/debops'
debops.debops:3.0.5 was installed successfully 

vars

$ cat ./inventory/group_vars/all/environment.yml 
---
inventory__group_environment:
  CI: "{{ True if lookup('env', 'CI') else False }}"

I also tried with ' and " and | lower

issue

An unhandled exception occurred while running the lookup plugin 'template'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Unexpected templating type error occurred on (
[ template content from https://github.com/debops/debops/blob/master/ansible/roles/environment/templates/lookup/environment__variables.j2 ]
): sequence item 2: expected str instance, bool found. sequence item 2: expected str instance, bool found
@JeGoi JeGoi changed the title Boolean issue in role environment - debops v3.0.5 Role environment - debops v3.0.5 - type error bool instead of str Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant