Brian said what to do, but left /how to do it/ as a (very worthwhile)
exercise for the reader.
It could look something like
when: group_names | select('search', '_broker' ) | length > 0 # matches
all the broker groups
when: group_names | select('search', kenv ~ '_app_zoo') | length >
I've been staring at this for quite a while. I was able to reproduce
your issue, and I now understand what's going on.
Rather than trying to duplicate the "single vs. multiple ips on an
interface", I just ran a playbook against two hosts (tango and
cloister), and did
- name: Set
See `select` (or `reject`) filter with `match` test, you can use it to
go over group_names.
--
--
Brian Coca (he/him/yo)
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from
Thanks Todd. My messages kept getting deleted so I thought to try again
I probably over-redacted the output of the playbook to only show the
relevant bits. The full playbook is below:
== playbook ==
- name: Get Server Recycling Order
hosts: "{{ my_servers | default ('localhost') }}"
Thanks Todd. My messages kept getting deleted so I thought to try again
I probably over-redacted the output of the playbook to only show the
relevant bits. The full playbook is below:
== playbook ==
- name: Get Server Recycling Order
hosts: "{{ my_servers | default ('localhost') }}"
Thanks Todd. My messages kept getting deleted so I thought to try again
I probably over-redacted the output of the playbook to only show the
relevant bits. The full playbook is below:
== playbook ==
- name: Get Server Recycling Order
hosts: "{{ my_servers | default ('localhost') }}"
I used the stat module as suggested by Todd and it worked perfectly. I
appreciate the suggestion and for setting me straight.
Thanks,
Harry
On Thursday, April 25, 2024 at 4:09:28 AM UTC-4 Stuart Lowe wrote:
> Something like this should work?
>
> ---
>
> - hosts: my_hosts
>
> become: true
>
Testing if my email is still deleted without any code
On Tuesday, April 23, 2024 at 11:28:59 PM UTC+1 Todd Lewis wrote:
> All that said, I don't see why this one task wouldn't work for your
> purposes:
>
> - name: Add hosts to groups
> ansible.builtin.add_host:
> name: "{{
I would terminate the host and spin up a fresh one.
This means your host will be in a known clean state again.
On Thu, 25 Apr 2024 at 12:45, Sven Feyerabend wrote:
>
> Hi everyone,
>
> I have a host where Ansible used to run correctly.
> A while ago, all runs of Ansible on this host started to
Hi everyone,
I have a host where Ansible used to run correctly.
A while ago, all runs of Ansible on this host started to hang on Gathering
Facts.
I've searched on the internet for a solution, and found some tips on how to
debug this.
So I ran Ansible with ANSIBLE_KEEP_REMOTE_FILES=1 and used
First of all thanks for solution. I tried this but how do we pass wildcard
as group *kafka_qa* in when condition or in j2*
On Friday, April 19, 2024 at 8:37:51 PM UTC+5:30 Todd Lewis wrote:
> Oops. That second "children:" under "kafka:" shouldn't be there.
> Otherwise, it's pretty close.
>
>
Hello Team,
is there any way to pass wildcard group in ansible when condition or in j2??
because if try with *kafka_qa_*_b as a group in j2 because i want to use
this in j2.*
*if kafka_qa or any group has zookeeper host then add zookeeper lines else
add broker lines.*
*it should be common
Hi Todd. I believe I responded to you but it seems my response was deleted.
I can post the full playbook and output if required. A lot of those debug
steps were just to understand why the condition was being ignored when
"is_leader" is set to false
I'll incorporate the suggestion above to
That was useful. But i still did not quite get how do we pass *kafka_dev*
in j2 or during runtime like we dont know before hand what group we will be
running against.*
*so in when condition can we pass something like this when group is *
*kafka_dev**
On Friday, April 19, 2024 at 8:37:51 PM
Thanks for taking a look at this Todd. Apologies for the messy output. I
over-redacted in an attempt to post only the relevant information
This is the full playbook followed by the output:
== playbook ==
- name: Get Server Recycling Order
hosts: "{{ my_servers | default ('localhost') }}"
Something like this should work?
---
- hosts: my_hosts
become: true
become_method: sudo
gather_facts: false
tasks:
- name: Determine if /var/log/messages is zero-length
ansible.builtin.find:
paths: /var/log
patterns: messages
register: messages_files
- name:
16 matches
Mail list logo