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
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
#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:
>>
>>
> {
"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...)
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
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
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
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
; 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
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
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') }}
>>
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') }}
>
>
>
"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
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>
> .
>
-
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
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
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
uot; && $1!="halt" &&
>>> $7!="/sbin/nologin") { print $1 } /etc/passwd'
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>> Harry
>>>
>>> --
>>> You received this message because
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/
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
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
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
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
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 |
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
@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
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
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
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
> 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
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
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
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
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
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
35 matches
Mail list logo