Hello, I'm trying to store a cisco device config in the fact cache, I'm 
doing it like this: 

    - name: "Get Config"
      register: config
      ios_command:
        commands: show running-config

    - name: "Store config as fact"
      set_fact:
        config: "{{ config.stdout }}"
        cacheable: true

While it's working, the resulting fact being created is the entire output 
from ios_command, meaning it includes changed, failed, stdout, and 
stdout_lines. 

I thought I was created a variable with "register: config" and then was 
storing just the stdout part of the variable by doing: config: "{{ 
config.stdout }}"

Is that not the proper way of accessing a variable?

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/012031d9-cf74-418e-9413-2f2a9947bafc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to