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

2023-06-08 Thread Alex Wanderley
Hello, Besides replacing the hyphens for underscore (as was already mentioned), aren't you missing the {{}} in your msg statement? msg: "osqueryd service file is {{ osqueryd-service-file.results.1.stdout}}" Alex On Thu, Jun 8, 2023 at 4:35 AM Kathy L wrote: > I have what I thought was an easy

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

2023-06-08 Thread Dick Visser
On Thu, 8 Jun 2023 at 13:04, Kathy L wrote: > Well, don't I feel stupid about the hyphens. Thanks. > > When I print out the results of the service file though, I get the > following: > > msg: "Osqueryd service file is > /work/roles/wazuh/files/osqueryd.serice\n/usr/lib/systemd/system/osque

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

2023-06-08 Thread Kathy L
Well, don't I feel stupid about the hyphens. Thanks. When I print out the results of the service file though, I get the following: msg: "Osqueryd service file is /work/roles/wazuh/files/osqueryd.serice\n/usr/lib/systemd/system/osqueryd.service" How do I get the results of the latter hal

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

2023-06-08 Thread Stephen Maher
Hi, Try replacing the hyphens with underscores are per documentation below. https://docs.ansible.com/archive/ansible/2.4/playbooks_variables.html#what-makes-a-valid-variable-name Regards > On 8 Jun 2023, at 11:35, Kathy L wrote: > > I have what I thought was an easy problem to solve. A cli

[ansible-project] register output of shell command

2023-06-08 Thread Kathy L
I have what I thought was an easy problem to solve. A client has several different set ups of Debian 10 hosts. We are using ansible to install osqueryd and need to install the osqueryd.service file. I am trying to register the first result of the command: "locate osqueryd.service." The e