On Thursday, 16 August 2018 00.56.06 CEST Tony Owens wrote:
> I'm trying to copy a file out with backup option which works fine. I'm
> pretty sure I am overlooking over something simple here. Any help is
> appreciated.
For starter you shouldn't use the developer list for user questions
Hi
I am for some reason, really struggling to pull an item from stdout and
register it.
Inside play:
1. - debug:
2. msg: "{{ output.stdout }}"
Output:
1. ok: [localhost] => {
2. "msg": {
3. "code": 200,
4. "data": "10.50.3.26",
5.
Hi Sumit,
The result is registered further up in the playbook which is where I'm
getting the stdout values from.
But I'd to grab the IP address from the 'data' key in the debug msg and
register that as a variable somehow to use elsewhere.
Thanks
--
You received this message because you are
Hi,
If you have already registered the output you can use “set_facts” module to
filter the ipaddress from the output and then use the ipaddress and use in
playbook as you want. For e.g.:
- hosts: localhost
tasks:
- name: run Test task
register: output
- debug:
msg: “{{
Hi,
I believe you are not registering the output before filtering the key i.e.
`data` in your case. You can try following:
- hosts: localhost
tasks:
- name: run Test task
register: output
- debug:
data: “{{ output[’data'] }}"
Hope it helps.
Regards,
Sumit
> On 16-Aug-2018,
Hi all- we're happy to announce that the general release of Ansible 2.5.8
is now available!
How do you get it?
--
$ pip install ansible==2.5.8 --user
The tar.gz of the release can be found here:
Hi all -- we're happy to announce that the general release of Ansible 2.6.3
is now available!
How do you get it?
--
$ pip install ansible==2.6.3 --user
The tar.gz of the release can be found here: