Re: [ansible-project] get windows-path and execute command

2024-01-28 Thread andregr...@gmail.com
perfect, that did the trick. thx a lot! regards, andre jbor...@gmail.com schrieb am Montag, 29. Januar 2024 um 04:10:53 UTC+1: > This will be because you are using the full result from win_shell which > includes things like changed, rc, stdout, stderr, etc. You need to do `- > win_shell: "{{

Re: [ansible-project] get windows-path and execute command

2024-01-28 Thread jbor...@gmail.com
This will be because you are using the full result from win_shell which includes things like changed, rc, stdout, stderr, etc. You need to do `- win_shell: "{{ pingpath.stdout |trim }} 9.9.9.9" and say you want to use the stdout value of the result which contains the full path. The | trim is

Re: [ansible-project] get windows-path and execute command

2024-01-26 Thread Todd Lewis
I'd start by adding a debug step to show what you actually registered: - name: Show what got registered in pingpath ansible.builtin.debug: msg: "{{ pingpath }}" Given that using it that way produced unexpected results, perhaps it's because the registered data aren't what you expect. On

[ansible-project] get windows-path and execute command

2024-01-26 Thread andregr...@gmail.com
hi, i want to use "get-command" to get the location of a program. in the next step i want to execute this program with a full qualified location. this example is just an example, i know there are other modules for doing a ping. i use (get-command ping).source to get the location. in the next