I am trying to retreive information about installed versions of a package on a
couple of hosts.
- name: check pgBackRest version
command: /usr/bin/pgbackrest version
register: backrest_version
- name: Print return information from the previous task
ansible.builtin.debug:
var: backrest_version
the output I am getting is already contains the information wanted but is not
sufficiently handy format-wise.especially running on more then a handfull of
hosts.
TASK [Print return information from the previous task]
***********************************************************************
ok: [step-0227] => {
"backrest_version": {
"changed": true,
"cmd": [
"/usr/bin/pgbackrest",
"version"
],
"delta": "0:00:00.008057",
"end": "2022-07-18 18:08:20.394231",
"failed": false,
"msg": "",
"rc": 0,
"start": "2022-07-18 18:08:20.386174",
"stderr": "",
"stderr_lines": [],
"stdout": "pgBackRest 2.39",
"stdout_lines": [
"pgBackRest 2.39"
]
}
}
To make this more scalable I am wondering to how to tweak this further so I can
get a more usable kind of list or csv with only the concrete information needed
like domainname & the version of my package in question. So what would be the
direction to investigat in order to move towards the happyplace in this
endeavour?
--
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 it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1640273786.768370.1658160919076%40office.mailbox.org.