hi I want to check some pre-requisites on a couple of remote machines upon which I (if conditions are not met) I’ll create a ticket for the Linux department of my organisation (for them to fix those, which I am not able to do myself due to privilege restrictions).
There is one part using assert
- name: Get Group Data
ansible.builtin.getent:
database: "group"
key: "pgsqlroot"
split: ","
- name: Validate that current User is member of group
assert:
that: ansible_user_id in item.value
fail_msg: "User {{ ansible_user_id }} is not member of the group {{ item.value }}"
quiet: yes
with_dict: "{{ ansible_facts.getent_group }}"
this stops execition once hitting the first failure which prevents me from getting the required information for all remotes. I assert
maybe just the wrong module for only collecting information, or did I miss an option that prevents the playbook from stopping if condition is not met with ansible-doc assert
?
@gwmngilfen: you removed the tag feeback-wanted
from this post. Is there any explanation on how to use which tag, anywhere? Or would you mind to comment on why it was not the right fit for this Topic?