@@ -15,6 +15,16 @@ The following modules are currently available:
15
15
- `` napalm_translate_yang ``
16
16
- `` napalm_validate ``
17
17
18
+ Actions
19
+ =======
20
+
21
+ Actions will only work with Ansible version 2.3 or greater.
22
+ They provides default parameters for the hostname, username, password and timeout paramters.
23
+ * hostname is set to the first of provider {{ hostname }}, provider {{ host }}, play-context remote_addr.
24
+ * username is set to the first of provider {{ username }}, play-context connection_user.
25
+ * password is set to the first of provider {{ password }}, play-context password (-k argument).
26
+ * timeout is set to the provider {{ timeout }}, or else defaults to 60 seconds (can't be passed via command-line).
27
+
18
28
Install
19
29
=======
20
30
@@ -32,20 +42,27 @@ Once you have installed ``napalm-ansible`` run the command ``napalm-ansible`` an
32
42
```
33
43
$ napalm-ansible
34
44
To make sure ansible can make use of the napalm modules you will have
35
- to add the following configurtion to your ansible configureation
45
+ to add the following configuration to your ansible configuration
36
46
file, i.e. `./ansible.cfg`:
37
47
38
48
[defaults]
39
49
library = /Users/dbarroso/workspace/napalm/napalm-ansible/napalm_ansible
50
+ action_plugins = /Users/dbarroso/workspace/napalm/napalm-ansible/action_plugins
40
51
41
52
For more details on ansible's configuration file visit:
42
53
https://docs.ansible.com/ansible/latest/intro_configuration.html
43
54
```
44
55
56
+ Dependencies
57
+ =======
58
+ * [ napalm] ( https://github.com/napalm-automation/napalm ) 2.3.0 or later
59
+ * [ ansible] ( https://github.com/ansible/ansible ) 2.2.0.0 or later
60
+
61
+
45
62
Examples
46
63
=======
47
64
48
- Example to retreive facts from a device
65
+ Example to retrieve facts from a device
49
66
```
50
67
- name: get facts from device
51
68
napalm_get_facts:
@@ -87,3 +104,11 @@ Example to get compliance report
87
104
dev_os: "{{ dev_os }}"
88
105
validation_file: validate.yml
89
106
```
107
+
108
+ Example to use default connection paramters:
109
+ ```
110
+ - name: get facts from device
111
+ napalm_get_facts:
112
+ dev_os: "{{ os }}"
113
+ filter: facts,interfaces,bgp_neighbors
114
+ ```
0 commit comments