Skip to content

Commit 4977d36

Browse files
authored
Merge pull request #198 from yzguy/collection_readme
update README for collection usage #191
2 parents 634e177 + 30d3027 commit 4977d36

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

README.md

+27-8
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,40 @@ Action-Plugins
2222
Action-Plugins should be used to make napalm-ansible more consistent with the behavior of other Ansible modules (eliminate the need of a provider and of individual task arguments for hostname, username, password, and timeout).
2323

2424
They provide default parameters for the hostname, username, password and timeout paramters.
25-
* hostname is set to the first of provider {{ hostname }}, provider {{ host }}, play-context remote_addr.
26-
* username is set to the first of provider {{ username }}, play-context connection_user.
27-
* password is set to the first of provider {{ password }}, play-context password (-k argument).
28-
* timeout is set to the provider {{ timeout }}, or else defaults to 60 seconds (can't be passed via command-line).
25+
* hostname is set to the first of provider `{{ hostname }}`, provider `{{ host }}`, play-context remote_addr.
26+
* username is set to the first of provider `{{ username }}`, play-context connection_user.
27+
* password is set to the first of provider `{{ password }}`, play-context password (-k argument).
28+
* timeout is set to the provider `{{ timeout }}`, or else defaults to 60 seconds (can't be passed via command-line).
2929

30-
Install
30+
Installing
3131
=======
3232

33-
To install run either:
33+
You can install the napalm-ansible collection with the Ansible Galaxy CLI:
34+
35+
```
36+
ansible-galaxy collection install napalm.napalm
37+
```
38+
39+
You can also include it in a `requirements.yml` file and install it with `ansible-galaxy collection install -r requirements.yml`, using the format:
40+
41+
```
42+
---
43+
collections:
44+
- name: napalm.napalm
45+
```
46+
47+
You will also need to install `napalm` via Pip as it is a dependency
3448

3549
```
36-
pip install napalm-ansible
3750
pip install napalm
3851
```
3952

53+
Alternatively, you can install it via Pip
54+
55+
```
56+
pip install napalm napalm-ansible
57+
```
58+
4059
Or:
4160

4261
```
@@ -47,7 +66,7 @@ pip install napalm
4766
Configuring Ansible
4867
===================
4968

50-
Once you have installed ``napalm-ansible`` then you need to add napalm-ansible to your ``library`` and ``action_plugins`` paths in ``ansible.cfg``. If you used pip to install napalm-ansible, then you can just run the ``napalm-ansible`` command and follow the instructions specified there.
69+
If you have installed `napalm-ansible` via Pip you will need to add `library` and `actions_plugins` paths in `ansible.cfg`. Instructions can be found by running `napalm-ansible`
5170

5271
```
5372
$ cat .ansible.cfg

0 commit comments

Comments
 (0)