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

Fix pr #285 ini numbers #286 host icinga2 objects #287

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sol1-matt
Copy link

Fix #286 Adding icinga2_objects to inventory/host_vars does nothing
Fix #285 Jninja error generating icingaweb2 where some values are numeric

@cla-bot cla-bot bot added the cla/signed label May 17, 2024
@mkayontour
Copy link
Member

Hi matt, thanks for your PR. Can you change the PR to the fix for the numeric value problem?

Do you know if this is backwards compatible?

@mkayontour
Copy link
Member

mkayontour commented May 24, 2024

I added tests for this case: https://github.com/Icinga/ansible-collection-icinga/actions/runs/9221232221/job/25369843073

But with jinja 3.1.4 which is in this testcase the latest version - it works without issue.

Run python3 -m pip install --upgrade pip
Requirement already satisfied: pip in /opt/hostedtoolcache/Python/3.10.[14](https://github.com/Icinga/ansible-collection-icinga/actions/runs/9221232221/job/25369843073#step:4:15)/x64/lib/python3.10/site-packages (24.0)
Collecting ansible-core==2.16.4 (from -r requirements-test-2.16.4.txt (line 1))
  Downloading ansible_core-2.16.4-py3-none-any.whl.metadata (6.9 kB)
Collecting molecule (from -r requirements-test-2.[16](https://github.com/Icinga/ansible-collection-icinga/actions/runs/9221232221/job/25369843073#step:4:17).4.txt (line 2))
  Downloading molecule-24.2.1-py3-none-any.whl.metadata (5.8 kB)
Collecting ansible-lint (from -r requirements-test-2.16.4.txt (line 3))
  Downloading ansible_lint-24.5.0-py3-none-any.whl.metadata (5.6 kB)
Collecting molecule-docker (from -r requirements-test-2.16.4.txt (line 4))
  Downloading molecule_docker-2.1.0-py3-none-any.whl.metadata (5.3 kB)
Collecting pytest-testinfra (from -r requirements-test-2.16.4.txt (line 5))
  Downloading pytest_testinfra-10.1.0-py3-none-any.whl.metadata (3.7 kB)
Collecting jinja2>=3.0.0 (from ansible-core==2.16.4->-r requirements-test-2.16.4.txt (line 1))
  Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)

@mkayontour
Copy link
Member

ping @sol1-matt - is this still a problem or does it work with the newer versions of jinja?

@sol1-matt
Copy link
Author

@mkayontour the base OS was Debian 12, so the versions of ansible and jninja in the tickets were from the latest packages available with the OS. We didn't try pulling down the latest versions of jninja and installing outside OS package management.

The fork where these changes are coming from (https://github.com/sol1-ansible/ansible-collection-icinga/tree/defaults_roles) is what we have been using to install all our recent Icinga clusters (5 since I posted this) but I haven't tested if taking it out causes it to break again. I assume it would as the OS's for ansible have primarily been Debian 12 though we do run AWX, I think that goes on a red hat based OS but I've not had to set that up myself.

I have another install this morning from a Debian 11 ansible system, I'll test the value | string there and let you know how it goes.

@mkayontour
Copy link
Member

Any updates?
I'm since then never run in this issue again ;)

@sol1-matt
Copy link
Author

@mkayontour the fix value | string is part of our fork and we haven't run into this problem again while using it on the last half dozen installs we have used it with.

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