Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

tony-schndr/br35ba56.datapower

Repository files navigation

DataPower Collection for Ansible

CI Network Integration codecov Roles

The Ansible DataPower collection includes a variety of modules to automate IBM DataPower Appliances.

Tested with Ansible

2.9, 2.10, 2.11

Tested with Python >=3.5

Does not work with python 2.7 due to known bug when encoding/decoding file content.

Supported connections

The ansible datapower collection supports httpapi connections.

Ensure the DataPower's REST Mgmt Interface is enabled by logging into the DataPower CLI and executing the following:

co; rest-mgmt; admin-state enabled; port 5554; exit;
write mem;

Then define the following variables in an inventory file.

ansible_connection=httpapi
ansible_httpapi_use_ssl=yes
ansible_httpapi_port=<rest management port, default is 5554>
ansible_network_os=br35ba56.datapower.rest_mgmt
ansible_user=<DataPower user>
ansible_httpapi_password=<DataPower user password>

Included content

Please see the module and plugin collection here. Since the github pages documenation is rough around the edges for now, you could also use ansible-doc to retrieve module documentation.

ansible-doc plugin module br35ba56.datapower.config

Using this collection

- name: Save the DataPower 'default' domain.
  br35ba56.datapower.action:
    domain: default
    action: SaveConfig
- name: Export all domains and write it to local directory 'work/'
  br35ba56.datapower.backup_domains:
    dest: ./work/
  register: all_domains_export
- name: Restore a domain from a domain backup.
  br35ba56.datapower.restore_domains:
    overwrite_objects: yes
    overwrite_files: yes
    export_path: "{{all_domains_export.path}}"
- name: Export the GetStat_MPG service from the snafu domain
  br35ba56.datapower.export_zip:
    domain: snafu
    ref_objects: yes
    ref_files: yes
    dest: /var/tmp
    objects:
      - name: GetStat_MPG
        class: MultiProtocolGateway
  register: GetStat_export
- name: Import the service exported from snafu domain into foo domain
  br35ba56.datapower.import_zip:
    domain: foo
    export_path: "{{ GetStat_export.path }}"

Installing the Collection from Ansible Galaxy

Before using this collection, you need to install it with the Ansible Galaxy command-line tool.

From Ansible Galaxy:

ansible-galaxy collection install br35ba56.datapower

Directly from GitHub repository:

ansible-galaxy collection install git+https://github.com/tony-schndr/br35ba56.datapower.git

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: br35ba56.datapower

Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the ansible package. To upgrade the collection to the latest available version, run the following command:

ansible-galaxy collection install br35ba56.datapower --upgrade

You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 1.0.1:

ansible-galaxy collection install br35ba56.datapower:==1.0.1

See Ansible Using collections for more details.

Release notes

See the changelog.

Roadmap

More information

Code of Conduct

We follow the Ansible Code of Conduct in all our interactions within this project.

If you encounter abusive behavior, please refer to the policy violations section of the Code for information on how to raise a complaint.

Contributing to this collection

The content of this collection is made by people like you, a community of individuals collaborating on making the world better through developing automation software.

We are actively accepting new contributors.

Any kind of contribution is very welcome.

You don't know how to start? Refer to our contribution guide!

We use the following guidelines:

Governance

The process of decision making in this collection is based on discussing and finding consensus among participants.

Every voice is important. If you have something on your mind, create an issue or dedicated discussion and let's discuss it!

Licensing

GNU General Public License v3.0 or later.

See LICENSE to see the full text.

About

Ansible collection for IBM DataPower Gateways

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages