The ctrliq.ascender collection lets you manage an Ascender controller from Ansible playbooks: organizations, inventories, projects, job templates, credentials, schedules, workflows, and the rest of the controller API are all exposed as modules, alongside a dynamic inventory plugin and a set of lookup plugins.
ansible-core>= 2.16- Python 3.10+ on the controller node running the modules
- awxkit — only required by a handful of
modules (notably
exportandimport). TheDOCUMENTATIONblock of each module states whether it needs awxkit; the rest have no extra Python dependencies.
ansible-galaxy collection install ctrliq.ascenderBuild the collection from a checkout of this repository:
ansible-galaxy collection build
ansible-galaxy collection install ctrliq-ascender-*.tar.gzReference modules, the inventory plugin, and lookups by their fully qualified
collection name, ctrliq.ascender.<name>:
- name: Create a project and launch a job
hosts: localhost
gather_facts: false
tasks:
- name: Add a project
ctrliq.ascender.project:
name: My Project
organization: Default
scm_type: git
scm_url: https://github.com/ansible/test-playbooks.git
- name: Launch a job template
ctrliq.ascender.job_launch:
job_template: My Job Template
register: job
- name: Wait for it to finish
ctrliq.ascender.job_wait:
job_id: "{{ job.id }}"To use the dynamic inventory plugin, add a *.controller.yml (or
*.controller.yaml) inventory source:
plugin: ctrliq.ascender.controller
host: https://controller.example.comEvery module accepts the same connection options. You can authenticate with either:
- host, username, and password, or
- host and an OAuth2 token (preferred).
Connection settings are resolved from highest to lowest precedence:
- Direct module parameters (
controller_host,controller_username,controller_password,controller_oauthtoken,controller_verify_ssl). - Environment variables (
CONTROLLER_HOST,CONTROLLER_USERNAME,CONTROLLER_PASSWORD,CONTROLLER_OAUTH_TOKEN,CONTROLLER_VERIFY_SSL) — most convenient when targetinglocalhost. - A config file passed via the
controller_config_fileparameter.
The config file may be written as INI, YAML, or JSON. INI form:
[general]
host = https://localhost:8043
verify_ssl = true
oauth_token = LEdCpKVKc4znzffcpQL5vLG8oyeku6- 44 modules covering controller resources (organizations, teams,
users, inventories, hosts, groups, projects, credentials, job/workflow
templates, schedules, notifications, settings, tokens, and more), plus
export/importfor bulk configuration. - Inventory plugin:
ctrliq.ascender.controller. - Lookup plugins:
controller_api,schedule_rrule, andschedule_rruleset.
Per-plugin documentation is available with ansible-doc, e.g.
ansible-doc ctrliq.ascender.job_launch.
See TESTING.md for full details.
- Sanity —
ansible-test sanityfrom an installed copy. - Unit —
py.test test/ascender/against the Ascender Django models. - Integration —
ansible-test integrationwith a running controller.
This collection is licensed under the GNU General Public License v3.0 or later. See COPYING for the full text.