diff options
author | 2019-04-25 09:33:43 -0400 | |
---|---|---|
committer | 2019-04-25 10:56:56 -0400 | |
commit | dea21123218a3ac602f9a859ffddae8e72e4194d (patch) | |
tree | f24daa60dd85b29a6867969f5d0ce98b3cc801fd /components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts | |
parent | 79895ed99627931ab6c934dab074e36c3e9e06a4 (diff) |
Finalize ansible usage
Change-Id: Iaca6bb573e31607eaa9a3a603e1e4beae60c817c
Issue-ID: CCSDK-1215
Signed-off-by: Alexis de Talhouët <adetalhouet89@gmail.com>
Diffstat (limited to 'components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts')
2 files changed, 26 insertions, 15 deletions
diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/ansible/first.yaml b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/ansible/first.yaml index 78d292e10..279733e48 100644 --- a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/ansible/first.yaml +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/ansible/first.yaml @@ -1,22 +1,20 @@ --- -- name: Get Device Facts - hosts: dc1 - roles: - - juniper.junos - connection: local +- name: Get Device Running Config + hosts: all gather_facts: no + connection: local + any_errors_fatal: True + serial: 5 tasks: - - name: Checking NETCONF connectivity - wait_for: - host: "{{ inventory_hostname }}" - port: 830 - timeout: 5 + - name: Get Running Config + netconf_rpc: + rpc: get-config + content: | + <source><running/></source> + register: netconf_output - - name: Retrieving information from devices running Junos OS - juniper_junos_facts: - host: "{{ inventory_hostname }}" - - name: Print version + - name: Print Running Config debug: - var: junos.version
\ No newline at end of file + var: netconf_output
\ No newline at end of file diff --git a/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/ansible/inventory.yaml b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/ansible/inventory.yaml new file mode 100644 index 000000000..fd3aa5057 --- /dev/null +++ b/components/model-catalog/blueprint-model/test-blueprint/remote_scripts/Scripts/ansible/inventory.yaml @@ -0,0 +1,13 @@ +all: + children: + lab: + hosts: + nfx1: + ansible_ssh_host: "{{ ip }}" + ansible_network_os: junos + + vars: + ansible_ssh_user: "{{ username }}" + ansible_ssh_pass: "{{ password }}" + ansible_connection: netconf + host_key_checking: False
\ No newline at end of file |