Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,33 @@
# Ansible Collection - itential.platform

# License
## License

This project is licensed unser the GPLv3 open source license. See
This project is licensed under the GPLv3 open source license. See
[LICENSE](LICENSE)

## Setup Instructions

### 1. Install Dependencies

Install all required Python packages:
```sh

```bash
pip install -r requirements.txt
```

### 2. Install Itential Core Collection

Since the code depends on the `itential.core` Ansible collection, install it using:
```sh

```bash
ansible-galaxy collection install itential.core
```

### 3. Run Unit Tests with Coverage

To execute tests and check code coverage:
```sh

```bash
coverage run -m pytest tests/ -v
coverage report -m
```
Expand All @@ -32,87 +38,106 @@ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
## Available Modules

### Job Worker Management

- **activate_job_worker**: Activate the job worker for an Itential Platform system

```yaml
- name: Activate Itential Platform job worker
itential.platform.activate_job_worker:
```

- **deactivate_job_worker**: Deactivate the job worker for an Itential Platform system

```yaml
- name: Deactivate Itential Platform job worker
itential.platform.deactivate_job_worker:
```

### Task Worker Management

- **activate_task_worker**: Activate the task worker for an Itential Platform system

```yaml
- name: Activate Itential Platform task worker
itential.platform.activate_task_worker:
```

- **deactivate_task_worker**: Deactivate the task worker for an Itential Platform system

```yaml
- name: Deactivate Itential Platform task worker
itential.platform.deactivate_task_worker:
```

### System Information

- **get_system_health**: Retrieve the health status of an Itential Platform system

```yaml
- name: Get Itential Platform system health
itential.platform.get_system_health:
```

- **get_worker_status**: Get the current status of Itential Platform workers

```yaml
- name: Get Itential Platform worker status
itential.platform.get_worker_status:
```

### Job and Task Management

- **get_jobs**: Retrieve a list of jobs from an Itential Platform system

```yaml
- name: Get Itential Platform jobs
itential.platform.get_jobs:
```

- **get_tasks**: Retrieve a list of tasks from an Itential Platform system

```yaml
- name: Get Itential Platform tasks
itential.platform.get_tasks:
```

### System Administration

- **restart_adapter**: Restart a specific adapter in the Itential Platform system

```yaml
- name: Restart Itential Platform adapter
itential.platform.restart_adapter:
adapter_name: "my-adapter"
```

- **restart_application**: Restart the Itential Platform application

```yaml
- name: Restart Itential Platform application
itential.platform.restart_application:
```

### Connection Parameters

Each module requires the following connection parameters which can be defined in your Ansible environment:

- `host`: The hostname or IP of the Itential Platform instance
- `port`: The port number for the Itential Platform API
- `use_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 authentication
- `password`: 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:

```bash
ansible-doc itential.platform.<module_name>
```
2 changes: 1 addition & 1 deletion meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Collections must specify a minimum required ansible version to upload
# to galaxy
# requires_ansible: '>=2.9.10'
requires_ansible: '>=2.11.0'

# Content that Ansible needs to load from another location or that has
# been deprecated/removed
Expand Down