The Community Network collection includes community maintained content to help automate network appliances.
The community network collection supports network_cli
and httpapi
connections.
Click the Content
button to see the list of content included in this collection.
You can install the community network collection with the Ansible Galaxy CLI:
ansible-galaxy collection install community.network
You can also include it in a requirements.yml
file and install it with ansible-galaxy collection install -r requirements.yml
, using the format:
---
collections:
- name: community.network
# If you need a specific version of the collection, you can specify like this:
# version: ...
You can call modules by their Fully Qualified Collection Namespace (FQCN), such as community.network.routeros_command
.
The following example task replaces configuration changes in the existing configuration on a network device, using the FQCN:
---
- name: run command on remote devices
community.network.routeros_command:
commands: /system routerboard print
Alternately, you can call modules by their short name if you list the community.network
collection in the playbook's collections
, as follows:
---
- hosts: routeros01
gather_facts: false
connection: network_cli
collections:
- community.network
tasks:
- name: Gather facts from the device.
routeros_facts:
gather_subset: all
- Ansible Using collections for more details.
We welcome community contributions to this collection. If you find problems, please open an issue or create a PR against the Community Network collection repository.
You can also join us on:
- Freenode IRC -
#ansible-network
Freenode channel - Slack - https://ansiblenetwork.slack.com
See the Ansible Community Guide for details on contributing to Ansible.
See here.
- Ansible network resources
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Community code of conduct
GNU General Public License v3.0 or later.
See COPYING to see the full text.