# Task Generator

> Generate Ansible hardening tasks from CIS Benchmark rules using AI in SecureBaseline Cloud - playbook creation, validation, and preview

Source: https://opennix.org/en/docs/haas/task-generator/


## Overview

Task Generator uses AI (YandexGPT, Azure OpenAI, or OpenAI) to automatically create Ansible tasks from CIS Benchmark rule descriptions. This accelerates the development of custom hardening playbooks.

## How to Use

1. Navigate to **AI > Task Generator**
2. Enter a CIS rule description or rule ID
3. Select the target OS family
4. Select the workload type
5. Click **Generate**

The AI produces a ready-to-use Ansible YAML task.

## Workload Types

| Workload | Description |
|----------|-------------|
| general | Default server configuration |
| web_server | Web server (Nginx, Apache) |
| database | Database server (PostgreSQL, MySQL) |
| application | Application server |
| container_host | Docker/container host |
| bastion | Bastion/jump host |
| ci_cd | CI/CD pipeline server |
| monitoring | Monitoring server |

Workload type influences the AI recommendations - for example, a database server may need different firewall rules than a web server.

## Generated Output

The output is an Ansible YAML task that you can:
- **Copy** to clipboard
- **Download** as a .yml file
- Integrate into your existing Ansible playbooks

## Profile Recommendation

The Task Generator also includes a Profile Recommendation feature:

1. Describe your server workload
2. The AI suggests the most appropriate CIS profile (Level 1 or Level 2)
3. Provides reasoning for the recommendation

## Requirements

- An active LLM configuration (Settings > LLM)
- Supported providers: YandexGPT, Azure OpenAI, OpenAI

## See Also

- [CIS rule coverage analysis](/en/docs/haas/coverage-analysis/) - evaluate how well your Ansible roles cover CIS Benchmark rules using AI
- [CIS Benchmark security hardening](/en/docs/haas/hardening/) - apply generated tasks as part of a full CIS hardening profile
- [Automated CIS remediation workflow](/en/docs/haas/remediation/) - generate and approve fix scripts for specific failed rules

