This is the Ansible Collection provided by the Juniper Network Automation Team for automating actions in Junos Space.
This Collection is meant for distribution via Ansible Galaxy as is available for all
space_device_info
- Obtain information about one or many space Rules, with filter optionsspace_device
- This module allows for addition, deletion, or modification of devices in Junos Spacespace_queue
- Manage state of Space's HornetQ Queuessd_address_info
- Obtain information about one or many SD address objects, with filter optionssd_address
- This module allows for addition, deletion, or modification of addresses in SDsd_device_info
- Obtain information about one or many SD devices, with filter optionssd_service_info
- Obtain information about one or many SD service objects, with filter optionssd_service
- This module allows for addition, deletion, or modification of services in SDsd_nat_policy_info
- Obtain information about one or many SD NAT policiessd_nat_rule_info
- Obtain information for all SD NAT rules for a given policy ID or a specific rule given a rule IDsd_fw_policy_info
- Obtain information about one or many SD firewall policiesAn example for using this collection to manage a log source with Junos Space is as follows.
inventory.ini
(Note the password should be managed by a Vault for a production environment.
[space]
space01 ansible_host=192.168.30.1
[space:vars]
ansible_network_os=juniper.space.space
ansible_connection=httpapi
ansible_user=super
ansible_password=SuperPassword
ansible_httpapi_port=34003
ansible_httpapi_validate_certs=False
ansible_httpapi_use_ssl=True
Below we specify our collection at the Play level which allows us to use the
space_device_info
module without specifying the need for the
Ansible Collection Namespace.
space_with_collections_example.yml
---
- name: Space API Example
hosts: all
connection: httpapi
gather_facts: no
collections:
- juniper.space
tasks:
- name: All devices
space_device_info:
Below we use the block
level keyword, we are able to use the space_device_info
module without the need for the Ansible Collection Namespace.
space_with_collections_block_example.yml
---
- name: Space API Example
hosts: all
connection: httpapi
gather_facts: no
tasks:
- name: Space Block Example
block:
- name: All devices
space_device_info:
collections:
- juniper.space
docs/
: local documentation for the collectionlicense.txt
: optional copy of license(s) for this collectiongalaxy.yml
: source data for the MANIFEST.json that will be part of the collection packageplaybooks/
: playbooks reside here
tasks/
: this holds 'task list files' for include_tasks
/import_tasks
usageplugins/
: all ansible plugins and modules go here, each in its own subdir
modules/
: ansible moduleslookups/
: lookup pluginsfilters/
: Jinja2 filter pluginsREADME.md
: information file (this file)roles/
: directory for ansible rolestests/
: tests for the collection's contentsd_nat_policy
sd_nat_rule
sd_fw_policy
sd_fw_rule
space_keys*