Re: [ansible-project] "Dirty" find printout question

2024-03-27 Thread Alex Wanderley
e.builtin.debug: > msg: "{{ log_search.files | map(attribute='path') }}" > > > > On Wed, 27 Mar 2024 at 00:17, Alex Wanderley > wrote: > >> Yes, it worked like a charm by going with: >> >> - name: print collection result >> a

Re: [ansible-project] "Dirty" find printout question

2024-03-26 Thread Alex Wanderley
n Tue, Mar 26, 2024 at 4:43 PM Alex Wanderley wrote: > Thanks for the quick reply, Matt...! > > I'll take a look at that... > > Alex > > On Tue, Mar 26, 2024 at 4:37 PM Matt Martz wrote: > >> The functionality you are looking for is the `label` option of >> `loop_c

Re: [ansible-project] "Dirty" find printout question

2024-03-26 Thread Alex Wanderley
#limiting-loop-output-with-label > > On Tue, Mar 26, 2024 at 5:36 PM Alex Wanderley > wrote: > >> Hello, >> >> We have a simple/working playbook that looks for log files based on the >> server's name and prints the file(s) it could find: >> >>

[ansible-project] "Dirty" find printout question

2024-03-26 Thread Alex Wanderley
> { "msg": "/path/to/directory/logs/monitor--02-2024.03.18.log" } How could I, if even possible, format the printout so it would only show the whole path to the file, omitting/discarding all the other file attributes information? (And please forgive my ignorance...)

Re: [ansible-project] Set variable based on a file's string search

2024-03-07 Thread Alex Wanderley
otentially think about exposing location as > a fact, either through inference from dynamic inventory/inventory plugins, > or baking into custom facts so the host can report its location (though you > might have some chicken-and-egg constraints guiding you down your current > path.) &g

Re: [ansible-project] Set variable based on a file's string search

2024-03-07 Thread Alex Wanderley
ps.google.com/d/msgid/ansible-project/AF495547-15F6-4E50-ACD2-D2B1F1A75945%40nist.gov > <https://groups.google.com/d/msgid/ansible-project/AF495547-15F6-4E50-ACD2-D2B1F1A75945%40nist.gov?utm_medium=email_source=footer> > . > -- [image: Edmonton_sig_RGB_S.jpg] Alex Wanderley Applicat

Re: [ansible-project] Set variable based on a file's string search

2024-03-07 Thread Alex Wanderley
mtp.conf expressions: > > vars: > locmap: > locationX: snmpd.conf-X > locationY: snmpd.conf-Y > locationZ: snmpd.conf-Z > > Then your set_fact becomes "snmpd_conf: '{{ > locmap[grep_result.stdout_lines[0]] }}' > That way you don't have to change

[ansible-project] Set variable based on a file's string search

2024-03-07 Thread Alex Wanderley
tdout == 'locationY' %}snmpd.conf-Y\ {% else %}snmpd.conf-Z\ {% endif %}" How could I, as simply as using the command/shell modules, accomplish the same results without resourcing to shell commands? Thanks a lot, Alex -- [image: Edmonton_sig_RGB_S.jpg] Alex Wanderley A

Re: [ansible-project] Passing MariaDB query result - Solved

2023-07-20 Thread Alex Wanderley
; saying it doesn't contain anything named "hostname". It may not contain " >> query_result" either. Like I said before, it makes me question what's >> registered by your query *in that particular run*. Stick another debug >> task before that showing what's being re

Re: [ansible-project] Passing MariaDB query result

2023-07-20 Thread Alex Wanderley
stion what's > registered by your query *in that particular run*. Stick another debug > task before that showing what's being registered by the db query task. > On Thursday, July 20, 2023 at 2:10:11 PM UTC-4 Alex Wanderley wrote: > >> Yes, I'm afraid we indeed are still in a tran

Re: [ansible-project] Passing MariaDB query result

2023-07-20 Thread Alex Wanderley
I can't offer any actionable suggestions. Good luck, > -- > Todd > > On Thursday, July 20, 2023 at 12:43:50 PM UTC-4 Alex Wanderley wrote: > >> Hi Todd, >> >> Thanks for helping... >> >> {{ cacti_query.query_result | map(attribute='hostname') }} >>

Re: [ansible-project] Passing MariaDB query result

2023-07-20 Thread Alex Wanderley
instead I got: "msg": "[AnsibleUndefined]" Would that possibly be caused by Ansible/Python versions? We have Ansible 2.9.7 and Python 3.6.8. Regards, Alex On Thu, Jul 20, 2023 at 9:52 AM Todd Lewis wrote: > {{ cacti_query.query_result | map(attribute='hostname') }} > > >

[ansible-project] Passing MariaDB query result

2023-07-20 Thread Alex Wanderley
"host_C" }, { "hostname": "host_D" } ] ] } How could I create a list with just the actual host names "host_A host_*B * host_C host_D" to be used/referenced in a loop further down my playbook? Thanks a lot, A

Re: [ansible-project] register output of shell command

2023-06-08 Thread Alex Wanderley
this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/71d6a619-8e30-44e9-b18f-4557f3fc7387n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/71d6a619-8e30-44e9-b18f-4557f3fc7387n%40googlegroups.com?utm_medium=email_source=footer> > . > -

[ansible-project] Help with parsing "vmware_vm_info" output

2023-05-02 Thread Alex Wanderley
ld I have (in this case) only the VM name "rhel8tst" printed out? Thanks a lot, Alex -- [image: Edmonton_sig_RGB_S.jpg] Alex Wanderley Application and Infrastructure Analyst II Server Solutions & Automation Financial and Corporate Services | Open City and Technology 780-496

Re: [ansible-project] Play is skipped in playbook

2023-04-27 Thread Alex Wanderley
googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/e16884de-0b9c-4211-8cd2-281436216ca5n%40googlegroups.com?utm_medium=email_source=footer> > . > -- [image: Edmonton_sig_RGB_S.jpg] Alex Wanderley Application and Infrastructure Analyst II Server Solutions & Automation

[ansible-project] Task timeout not triggered

2023-03-21 Thread Alex Wanderley
x -- [image: Edmonton_sig_RGB_S.jpg] Alex Wanderley Application and Infrastructure Analyst II Server Solutions & Automation Financial and Corporate Services | Open City and Technology 780-496-4156 Office 780-819-0273 Mobile City of Edmonton Century Place, 19th Floor 9803

Re: [ansible-project] Issue with a shell command

2023-03-21 Thread Alex Wanderley
uot; && $1!="halt" && >>> $7!="/sbin/nologin") { print $1 } /etc/passwd' >>> >>> Any ideas? >>> >>> Thanks, >>> Harry >>> >>> -- >>> You received this message because

Re: [ansible-project] Comparing command line variable in import_playbook

2023-02-07 Thread Alex Wanderley
ou are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-project+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread Alex Wanderley
Hi, Take a look at Ansible's "expect" module. It may give what you need... Alex On Mon, Feb 6, 2023 at 11:51 AM Linux Study wrote: > Bash script itself asking some questions. So how can we pass that answer > via ansible? > > Regards, > Abhi > > On Tue, 7

Re: [ansible-project] Pass user inputs to bash script via ansible

2023-02-06 Thread Alex Wanderley
WkhVWsW_6EDNh2aQ%3DVaxq%2BO1cBybw%40mail.gmail.com?utm_medium=email_source=footer> > . > -- [image: Edmonton_sig_RGB_S.jpg] Alex Wanderley Application and Infrastructure Analyst II Server Solutions & Automation Financial and Corporate Services | Open City and Technology 780-49

Re: [ansible-project] Expect still prompting to continue

2022-09-26 Thread Alex Wanderley
e.com/d/msgid/ansible-project/CABcUpdpO7UkDCuCyGwZO3QEBUZWrmmZXsP6rVb_Ekqv%3DVJr9hg%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CABcUpdpO7UkDCuCyGwZO3QEBUZWrmmZXsP6rVb_Ekqv%3DVJr9hg%40mail.gmail.com?utm_medium=email_source=footer> > . > -- [image: Edmonton_sig_RG

Re: [ansible-project] Fwd: Shell script doesn't run completely even on using async

2022-02-15 Thread Alex Wanderley
ups.google.com/d/msgid/ansible-project/CABNWynCRc-jFroRGVezWauMZvLSNXRtD7pJh%2BWma-EJFArsFcw%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CABNWynCRc-jFroRGVezWauMZvLSNXRtD7pJh%2BWma-EJFArsFcw%40mail.gmail.com?utm_medium=email_source=footer> > . > -- [i

[ansible-project] Live GPT partition expansion

2022-02-14 Thread Alex Wanderley
fdisk" to do that already, from the command line.) Any tip/input would be truly appreciated... Regards, Alex -- [image: Edmonton_sig_RGB_S.jpg] Alex Wanderley Application and Infrastructure Analyst II Acting Team Lead Storage and Backup Solutions Financial and Corporate Services |

Re: [ansible-project] ansible -a sudo command hangs

2022-02-10 Thread Alex Wanderley
unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/c588d43d-40b6-4ba6-9ca7-027bdfe8e95bn%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/c588d43d-40b6-4ba6-9ca7-027bdfe8e95bn%40goog

Re: [ansible-project] Feedback Wanted: New table design for Ansible module documentation

2021-11-16 Thread Alex Wanderley
@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/d82c32bf-21a3-490f-ad43-3a38de501d7en%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/d82c32bf-21a3-490f-ad43-3a38de501d7en%40googlegroups.com?utm_mediu

Re: [ansible-project] ssh management ansible

2021-10-22 Thread Alex Wanderley
e-project+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/09e4f6f5-0cde-4828-a82f-d2d618ad29d0n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/09e4f6f5-0cde-4828-a82f-d2d618ad29d0n%40googl

Re: [ansible-project] List manipulation questions

2021-09-28 Thread Alex Wanderley
t you make it as > much > idempotent as possible. Else, if you run your playbook on different days, > it > would be filled with all the possible values of every host all this > while. The > regex parameter is really important here, making sure that every host has > exactly one li

[ansible-project] List manipulation questions

2021-09-27 Thread Alex Wanderley
Hello, I understand this very basic, but I'm still learning... (And my apologies for the long message.) I built the playbook below so I can check which server is still in need of an OS update based on its current kernel version: --- - hosts: "{{ my_host }}" remote_user: xx

Re: [ansible-project] Vizualizing execution of "include_tasks" tasks

2021-06-08 Thread Alex Wanderley
> You haven't shown the actual task definition of the `include_tasks` nor > how you are running ansible-playbook. > > I'm going to guess it's related to tags, but that is just a shot in the > dark, as you haven't provided much information to go on. > > On Tue, Jun 8, 2021 at 1

Re: [ansible-project] Vizualizing execution of "include_tasks" tasks

2021-06-08 Thread Alex Wanderley
oup. > To unsubscribe from this group and stop receiving emails from it, send an > email to ansible-project+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/CACVha7dpwZ2Y5-V1_-X8NYm8%2B99iAq%2BpnHUX8ZzAEcNNT

[ansible-project] Vizualizing execution of "include_tasks" tasks

2021-06-07 Thread Alex Wanderley
Hello, When executing a playbook which has "include_tasks", I can see the message about the tasks file that's being included. For example: TASK [Expand disks and file systems] * included: /ansible/playbooks/tasks/expand_fs.yml for yyy PLAY RECAP Is there a way to tell

Re: [ansible-project] Ansible Inventory Security (all)

2021-05-06 Thread Alex Wanderley
sion on the web visit > https://groups.google.com/d/msgid/ansible-project/10c66396-aab0-4506-87ad-9a1d8676d097n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/10c66396-aab0-4506-87ad-9a1d8676d097n%40googlegroups.com?utm_medium=email_source=footer> > . > -- [image

Re: [ansible-project] How to launch AWX workflows sequentially

2021-04-19 Thread Alex Wanderley
com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/050ef74d-86bf-4e4a-9a4e-2e6b0f50fb77n%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/050ef74d-86bf-4e4a-9a4e-2e6b0f50fb77n%40googlegroups.com?utm_medium=email_source=foo

[ansible-project] Handling Oracle Dataguard failover/failback

2021-03-17 Thread Alex Wanderley
Hello, Is there anybody out there using Ansible playbooks to handle Oracle Dataguard's failover and failback operations? We are working on automating the OS update process of Linux servers that host Dataguard pairs (they are not in the cloud) and that requires rebooting each primary/standby