I think I got it. Thanks Brian
On Thu, Mar 21, 2024 at 9:50 AM Brian Coca wrote:
> Both are valid approaches but do different things, hostvars will
> provide a untemplated subset of what you can get through the vars
> lookups for the case of 'inventory_hostname', but the lookups do not
>
Got it, I’ll use the lookup. Thanks Brian
> On Mar 18, 2024, at 10:36 AM, Brian Coca wrote:
>
> `vars` was undocumented and for internal use, we stopped using it
> internally but have been unable to remove it (and save many resources)
> because people keep using(abusing) it.
>
> Soon we will
Hey Brian - any concerns with
assert:
that: item in vars
Short and sweet!
Rob
On Fri, Mar 15, 2024 at 3:03 PM Brian Coca wrote:
> also varnames lookup
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ansible Project" group.
> To unsubscribe
Hey Todd - apologies, I don't understand your comment.
Hey Walter - yes, you are correct.
To elaborate on the use case. FIrst task in my playbooks confirms the user
provided all the expected/required variables. I iterate over the list of
variables and make sure they are defined with assert.
to python raw strings, where a
> backslash is always treated as literal. Double quotes require escaping
> backslashes. You can read more about the flow scalar styles of YAML at
> https://yaml.org/spec/1.2.2/#73-flow-scalar-styles
>
> On Tue, Jan 9, 2024 at 8:37 AM Rob Wagner wro
quotes is automatically escaped?
Walter
--
Walter Rowe, Division Chief
Infrastructure Services Division
Mobile: 202.355.4123
On Jan 9, 2024, at 9:04 AM, Rob Wagner wrote:
Right, but why doesn’t the \\d need to be double-backslashed? Backslash-d is regex for matching on a digit. I just
-backslashed because the backref needs to be backslash-digit (\1). Doubling the backslash escapes the backslash.
Walter
--
Walter Rowe, Division Chief
Infrastructure Services Division
Mobile: 202.355.4123
On Jan 8, 2024, at 6:57 PM, Rob Wagner wrote:
Thanks Matt, but I still don't get why
Thanks Matt, but I still don't get why the first parameter (\\d) MAY be
double backslashed but the second parameter (\\1) MUST be double
backslashed. However, I'm starting to think it's at the python level.
https://stackoverflow.com/a/33582215 says Python's string parser causes
both \d and \\d to
Thanks Racke, but I just tried:
- name: task 3
debug:
msg: "{{ item }} is in s"
loop: "{{ t_list }}"
when: ( item | regex_replace('^p(\d+).*$', '\1') ) in s
It fails. Only works with \\1.
On Mon, Nov 21, 2022 at 9:52 AM Stefan Hornburg (Racke)
wrote:
> On 21/11/2022
Hey all - I'm hitting the infamous Timeout (12s) waiting for privilege
escalation prompt error but only under specific conditions. The task that
fails is a loop:
- name: copy files from blob
shell: "{{ blob_ssodba_download_working_dir }}/blob_ssodba_download.py
{{ item }} {{
Hey Andrew - were you able to get anywhere with this? I tried adding a
block/rescue without any luck. Searching all morning for a way to make
ansible move onto the next host in a serial strategy even if one task on
one host fails. I'm thinking it's not possible.
Rob
On Wednesday, April 10,
Thank you both, and apologies for not responding sooner (got yanked onto
something else). vars[] worked great.
Rob
On Thu, Jul 25, 2019 at 7:00 PM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On 25.07.2019 23:12, Brian Coca wrote:
> > yes, but your example only handles
All - I'm trying to dynamically set facts in a loop. (Long story short,
for a list of keys, if the key isn't defined, I want to replace the key
with the value from a register variable.) I have a playbook that works,
but it requires the use of {{ }} in a when: clause, and Ansible is
Any thoughts on this? I've been mulling it over and (not to dump on
passwordstore) it really seems like a lookup plugin shouldn't have side
effects.
Rob
On Tuesday, June 25, 2019 at 2:41:59 PM UTC-4, Rob Wagner wrote:
>
> Hey all - looking for some advice. I need to write either a
Hey all - looking for some advice. I need to write either a plugin or a
module to interact with Thycotic Secret Server. In most cases, my code
will simply retrieve a credential from Thycotic, so a lookup plugin makes
perfect sense. However, there are cases where a specific credential
Feel free to create a PR which does that.
>
> Cheers,
> Felix
>
>
>
> > I appreciate I'm
> > getting into the weeds here, but I found it curious that assert got
> > noisy in more recent versions.
> >
> > Rob
> >
> > On Wed, Feb 6
appreciate I'm getting into
the weeds here, but I found it curious that assert got noisy in more recent
versions.
Rob
On Wed, Feb 6, 2019 at 12:36 PM Rob Wagner wrote:
> Thanks Felix. That's a clever idea. I tested it and I get:
>
> ok: [localhost] => (item=/dev) => {
>
Thanks Felix. That's a clever idea. I tested it and I get:
ok: [localhost] => (item=/dev) => {
"changed": false,
"item": [
"/dev",
"root"
],
"msg": "All assertions passed"
}
ok: [localhost] => (item=/home) => {
"changed": false,
"item": [
"/home",
Thanks Kai. That's it. I thought I had read somewhere that dig will accept
a list, but clearly not.
On Mon, Dec 10, 2018 at 1:35 PM Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On Monday, 10 December 2018 18:39:02 CET rjwagner@gmail.com wrote:
> > - name: debug
> >
Thanks Kai. That worked. I think I don’t quite understand lookup plugins
(aside from with_items). I’ll keep researching.
Rob
> On Dec 5, 2018, at 3:08 PM, Kai Stian Olstad
> wrote:
>
>> On Wednesday, 5 December 2018 19:55:46 CET rjwagner@gmail.com wrote:
>> Hey all - I'm trying to
20 matches
Mail list logo