hello all,
i am having issues with getting return values from a module, honestly Im just unclear on how to call them
this is my code but when i execute the commands push but i get variable undefined from the debug https://pastebin.com/gx0fBYCN
hello all,
i am having issues with getting return values from a module, honestly Im just unclear on how to call them
this is my code but when i execute the commands push but i get variable undefined from the debug https://pastebin.com/gx0fBYCN
Hi C Bax
First, you have to give a variable name (let’s say command_result
for example) and register the output in it.
Second, you inspect that variable with the debug module.
tasks:
- name: Pushing aliases to lab devices
ios_config:
src: ./templates/aliases.j2
provider: "{{ cli }}"
register: command_result
- name: Displaying pushed configuration
debug:
var: commands_result