This project is licensed under the GPLv3 open source license. See LICENSE
Install all required Python packages:
pip install -r requirements.txt
Since the code depends on the itential.core
Ansible collection, install it using:
ansible-galaxy collection install itential.core
To execute tests and check code coverage:
coverage run -m pytest tests/ -v
coverage report -m
If you encounter an error related to forks, you might have to set this environmental variable: export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
- activate_job_worker: Activate the job worker for an Itential Platform system
- name: Activate Itential Platform job worker
itential.platform.activate_job_worker:
- deactivate_job_worker: Deactivate the job worker for an Itential Platform system
- name: Deactivate Itential Platform job worker
itential.platform.deactivate_job_worker:
- activate_task_worker: Activate the task worker for an Itential Platform system
- name: Activate Itential Platform task worker
itential.platform.activate_task_worker:
- deactivate_task_worker: Deactivate the task worker for an Itential Platform system
- name: Deactivate Itential Platform task worker
itential.platform.deactivate_task_worker:
- get_system_health: Retrieve the health status of an Itential Platform system
- name: Get Itential Platform system health
itential.platform.get_system_health:
- get_worker_status: Get the current status of Itential Platform workers
- name: Get Itential Platform worker status
itential.platform.get_worker_status:
- get_jobs: Retrieve a list of jobs from an Itential Platform system
- name: Get Itential Platform jobs
itential.platform.get_jobs:
- get_tasks: Retrieve a list of tasks from an Itential Platform system
- name: Get Itential Platform tasks
itential.platform.get_tasks:
- restart_adapter: Restart a specific adapter in the Itential Platform system
- name: Restart Itential Platform adapter
itential.platform.restart_adapter:
adapter_name: "my-adapter"
- restart_application: Restart the Itential Platform application
- name: Restart Itential Platform application
itential.platform.restart_application:
- set_adapter_log_level: Change the log level/transport of an adapter.
- name: Restart Itential Platform application
itential.platform.restart_applications:
- auth_token: Retrieves the auth token from an Itential Platform system
- name: Retrieve auth token
itential.platform.auth_token:
- generic_request: Makes an api reqeust given a method and endpoint
- name: Retrieve authorization accounts
itential.platform.generic_request:
method: GET
endpoint: "/authorization/accounts"
This collection includes 3 utils which are used by the action plugins.
-
host: A schema used to gather information from the ansible_task vars.
-
login: A utility that authenticates with the platform and returns the authentication token.
-
request: A utility that authenticates then constructs and sends an api request. Takes task_vars, method, endpoint, params, and data as arguments.
Each module requires the following connection parameters which can be defined in your Ansible environment:
host
: The hostname or IP of the Itential Platform instanceport
: The port number for the Itential Platform APIuse_tls
: Whether to use HTTPS (default: true)verify
: Whether to verify SSL certificates (default: true)disable_warnings
: Whether to disable SSL warning messages (default: false)
Authentication (requires one of the following):
- Option 1: Username/Password
username
: The username for authenticationpassword
: The password for authentication
- Option 2: Auth Token
auth_token
: A pre-existing authentication token
For detailed documentation on each module, use the ansible-doc
command:
ansible-doc itential.platform.<module_name>