-
Requires BlueCat Gateway v18.10.1 or greater
-
You must install the Python "requests" module.
pip install requests
To obtain the BlueCat Ansible module and playbooks, pull or clone this repository.
bluecat.py
is the Ansible module- playbooks are in the Examples folder in YAML format
The first time you run the BlueCat Gateway Module for Ansible, it will download the gateway_api.json
file from your BlueCat Gateway instance into the same folder where the Ansible playbook was executed.
The module reads from the gateway_api.json
file to determine what REST API requests your BlueCat Gateway instance supports.
If you upgrade your BlueCat Gateway image or want to connect to a different BlueCat Gateway instance, delete the gateway_api.json
file in the same folder as the Ansible playbook.
BlueCat recommends that you should not often change variables in external_vars.yml.
The variables should be set once, and then used with multiple playbooks.
To allow the Ansible playbook to consume the REST APIs within a workflow to call BlueCat Gateway and BlueCat Address Manager (BAM), you must import the REST API workflow into your BlueCat Gateway instance. You must manually download the REST API workflow from GitHub (https://github.com/bluecatlabs/gateway-workflows/tree/master/Community) and import it into your Gateway instance through the export/import workflow. Once the REST API workflow is imported, you must set permissions for it using Workflow Permissions, and then you can begin using the workflows.
To view the swagger docs for the REST API go to <BlueCatGatewayFQDN>/api/v1/
.
When contributing to the BlueCat Gateway Ansible Module, ensure that your code:
- Follows the PEP8 standard
- Uses meaningful variable and function names
- Fork it!
- Create your feature branch.
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
Copyright 2018 BlueCat Networks, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.