Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional step needed to get started #8

Merged
merged 3 commits into from
Sep 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This collection has been tested and supports Cisco DNA Center 2.1.1.
- Python >= 3.5, as the DNA Center SDK doesn't support Python version 2.x

## Install
Ansible must be installed
Ansible must be installed ([Install guide](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html))
```
sudo pip install ansible
```
Expand All @@ -24,12 +24,12 @@ DNA Center SDK must be installed
sudo pip install dnacentersdk
```

Install the collection
Install the collection ([Galaxy link](https://galaxy.ansible.com/cisco/dnac))
```
ansible-galaxy collection install cisco.dnac
```
## Use
First, define a `credentials.yml` file where you specify your DNA Center credentials as ansible variables:
First, define a `credentials.yml` ([example](playbooks/credentials.template)) file where you specify your DNA Center credentials as ansible variables:
```
---
dnac_host: <A.B.C.D>
Expand All @@ -40,7 +40,13 @@ dnac_version: 2.1.1 # optional, defaults to 2.1.1
dnac_verify: False # optional, defaults to True
```

Then, create a playbook `myplaybook.yml` referencing the variables in your credentials.yml file and specifying the full namespace path to the module, plugin and/or role:
Create a `hosts` ([example](playbooks/hosts)) file that uses `[dnac_servers]` with your Cisco DNA Center Settings:
```
[dnac_servers]
dnac_server
```

Then, create a playbook `myplaybook.yml` ([example](playbooks/tag.yml)) referencing the variables in your credentials.yml file and specifying the full namespace path to the module, plugin and/or role:
```
- hosts: dnac_servers
vars_files:
Expand All @@ -62,7 +68,7 @@ Execute the playbook:
```
ansible-playbook -i hosts myplaybook.yml
```
In the `playbooks` directory you can find more examples and use cases.
In the `playbooks` [directory](playbooks/) you can find more examples and use cases.


## Update
Expand Down