Comments (5)
Yes, it's working.
from ansible-collection-checkmk.general.
Hi @iscsrwm and thanks for the report.
I cannot reproduce the issue and your proposed solution is equivalent to the current implementation.
Can you provide a minimal reproduction example, so I can understand how the error comes about for you?
from ansible-collection-checkmk.general.
I just ran on a newly installed Ubuntu 20.04 instance:
root@ansible-test-inst:/home/ubuntu/repos/ansible-collection-tribe29.checkmk# ansible --version
ansible [core 2.12.7]
config file = /home/ubuntu/repos/ansible-collection-tribe29.checkmk/ansible.cfg
configured module search path = ['/home/ubuntu/repos/ansible-collection-tribe29.checkmk/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
jinja version = 2.10.1
libyaml = True
Playbook:
-
hosts: all
vars_files:- vars/checkmk_agent.yml
roles:
- agent
Vars:
checkmk_agent_version: "2.1.0p8"
checkmk_agent_edition: cee
checkmk_agent_protocol: https
checkmk_agent_site: "my-site"
checkmk_agent_server: "my-server.example.com"
checkmk_agent_update: 'true'
checkmk_agent_tls: 'true'
checkmk_agent_host_name: "{{ inventory_hostname_short }}"
checkmk_agent_add_host: 'true'
checkmk_agent_discover: 'true'
checkmk_agent_folder: "/my-folder"
automation_user: "automation"
automation_secret: "SECRET"
Output:
TASK [agent : Create host on server.] **********************************************************************************************************
fatal: [ph-5qhfc42 -> localhost]: FAILED! => {"changed": true, "failed_when_result": "The conditional check 'checkmk_agent_create_result.failed is true and "The host is already part of the specified target folder" not in checkmk_agent_create_result.msg' failed. The error was: template error while templating string: no test named 'true'. String: {% if checkmk_agent_create_result.failed is true and "The host is already part of the specified target folder" not in checkmk_agent_create_result.msg %} True {% else %} False {% endif %}", "msg": "Host created."}
But if I take the "is true" part out of the test, which I agree should be semantically equivalent it works.
from ansible-collection-checkmk.general.
It also runs fine when I kick it off via Rundeck in a container. So maybe this is an issue with Ansible 2.12.7 on Ubuntu 20.04. Anyhow I'll close this for now.
from ansible-collection-checkmk.general.
Thanks for the diagnosis @iscsrwm!
We had other issues with particular Ansible versions in the past, but our tests should have picked this one up.
I am quite restricted on time these days, if I can make some time, I will investigate a little more and see, if I can reproduce the issue.
But if I got you right, it works for you now?
from ansible-collection-checkmk.general.
Related Issues (20)
- [Feature Request] Create Host and Service Groups Rules via Ansible HOT 4
- [BUG] folder creation always lowers the foldername HOT 10
- [Feed] folder lookup plugin does not return the title of the folder HOT 3
- fixed downtime? HOT 4
- [BUG] "Register Agent for TLS" does not allow for "!" in checkmk_agent_auth on Linux HOT 1
- [FEED] Only register agent if host was created on the server or agent was installed HOT 4
- [FEED] Implement module for LDAP Connections
- [BUG] module "folder" not idempotent HOT 10
- [BUG] `discovery` module out of sync with the Checkmk REST API HOT 2
- [BUG] Error in the Agent role, Firewall seems to be only installed if checkmk_agent_server is an ip address HOT 3
- [FEED] Configure new web services monitoring HOT 1
- [BUG] rule idempotency check does not work for special_agents:vsphere rules HOT 4
- [BUG] ckeckmk agent deployment not respecting variables HOT 1
- [BUG] Unable to register agent for automatic updates HOT 5
- [BUG] Integration tests for downtime module creates downtime in the past HOT 1
- [BUG] Agent role crashes, when connections file absent HOT 4
- [BUG] InvalidAccessKeyId during installing the collection HOT 1
- Agent TLS registration does not work in disributed monitoring
- [BUG] Skip verifying the ssl cert for setting downtimes HOT 1
- [BUG] update_attribute on folder always results in 'changed' HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-collection-checkmk.general.