[ansible-project] How do I access the cpu %usage in this example? I'm getting an error no matter what I try.

2018-03-04 Thread Marcos Georgopoulos
Hi, I am using the Napalm module with Ansible and using its get_facts module to obtain some basic information from the device. The relevant output is below, "ansible_facts": { "napalm_environment": { "cpu": { "0": { "%us

[ansible-project] Re: How do I access the cpu %usage in this example? I'm getting an error no matter what I try.

2018-03-05 Thread Marcos Georgopoulos
On Monday, March 5, 2018 at 7:12:13 PM UTC+11, Varun Chopra wrote: > > You can access the first element using > result.ansible_facts.napalm_environment.cpu[0].%usage or so. > > On Monday, March 5, 2018 at 1:17:28 PM UTC+5:30, Marcos Georgopoulos wrote: >> >> >&g

Re: [ansible-project] Re: How do I access the cpu %usage in this example? I'm getting an error no matter what I try.

2018-03-05 Thread Marcos Georgopoulos
Thank you that did it. On Monday, March 5, 2018 at 9:08:31 PM UTC+11, Kai Stian Olstad wrote: > > On 05.03.2018 09:31, Marcos Georgopoulos wrote: > > On Monday, March 5, 2018 at 7:12:13 PM UTC+11, Varun Chopra wrote: > >> > >> You can

[ansible-project] Having trouble copying registered result to local file.

2018-03-05 Thread Marcos Georgopoulos
Hi, I am trying to save some results that I have registered to a file on my local machine ( that is running ansible ) The error I am getting is very generic and of no use. Below is the playbook and the resulting error --- - hosts: ios gather_facts: no connection: local vars: cli:

[ansible-project] trouble iterating through stdout_lines

2018-03-06 Thread Marcos Georgopoulos
Hi, I am trying to work out how to iterate through some results from a command I am running on a network device. the idea is when I find the line that matches what I am looking for based on a regexp I want to store it. tasks: - name: get the existing access-list ios_command: provider: "{

[ansible-project] Re: Having trouble copying registered result to local file.

2018-03-06 Thread Marcos Georgopoulos
ok, I managed to solve this, there was a problem with my install. On Tuesday, March 6, 2018 at 3:24:17 PM UTC+11, Marcos Georgopoulos wrote: > > Hi, > > I am trying to save some results that I have registered to a file on my > local machine ( that is running ansible ) The error

[ansible-project] determining network os type?

2018-03-08 Thread Marcos Georgopoulos
Hi, There are various network modules for iOS,EOS, etc etc... What I was wondering is there a way to determine a hosts base os type so that the correct network module can be called? I have seen some sites reference 'ansible_network_os' like below. However I am not sure is this is simple a v

[ansible-project] Can you set_fact on success or failure of play?

2018-03-22 Thread Marcos Georgopoulos
Hi, I have been trying to find a solution to the current scenario. Say we have 3 plays 1)Pre-Condition Check - check that the host is in the correct state before proceeding. 2)Make Change 3)Post-Condition Check Now we don't want the 2nd play to be run on hosts that failed the first play.

[ansible-project] Why do I have to split up this set_fact into multiple? or am I doing something incorrect?

2018-05-08 Thread Marcos Georgopoulos
Hi can someone please explain why the following two seperate 'set_fact's work. - name : combine network and wildcard set_fact: net_mask: "{{ '{{network}}/{{wildcard}}' }}" when: ansible_network_os == 'asa' - name : determine netmask from wildcard set_fact:

Re: [ansible-project] Why do I have to split up this set_fact into multiple? or am I doing something incorrect?

2018-05-10 Thread Marcos Georgopoulos
Thank you very much. It looks like I have some reading to do :) Cheers -- 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 ansible-project+unsubscr...@googlegr