> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.itential.com/itential-gateway/5/create-gateway-service/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server. # Create gateway services Itential Gateway provides a powerful framework for transforming your existing automation content into reusable services that can be orchestrated across your organization. By importing automation content from Git repositories, Gateway packages your scripts, playbooks, and infrastructure-as-code into standardized services that integrate seamlessly with the Itential Platform. **Supported service types** * Ansible playbooks * Python scripts * OpenTofu plans If you need to run a Python script as part of a single workflow without creating a reusable service, consider using the `runCode` task directly in Studio. The `runCode` task lets you write and execute inline Python code directly on the canvas—no Git repository or service registration required. For more information, see [runCode](/itential-platform/6-latest/studio/tasks/reference/runCode). ## How it works 1. **Repository integration:** Gateway connects to your Git repositories containing automation content 2. **Service creation:** Define services that reference specific automation assets 3. **Gateway Manager registration:** Services are automatically discovered and advertised to the Itential Platform 4. **Workflow execution:** Itential Platform can invoke these services as part of larger automation workflows ## Create a gateway service Use the `iagctl create service` command to create gateway services. For more information, see [iagctl create service](/itential-gateway/5/iagctl/create-service-ansible-playbook) in the command reference. ### Examples The following examples create gateway services that reference automation assets configured in a repository called `gateway-resources`. The `gateway-resources` repository has the following structure: ``` ├── README.md ├── ansibleplaybooks │ ├── hello-world.yml │ ├── requirements.txt │ └── requirements.yml ├── pythonscripts │ ├── main.py │ └── requirements.txt └── opentofuplans └── main.tf ``` #### Ansible Use `iagctl create service ansible-playbook` to create an Ansible Playbook service. The following example creates an Ansible playbook service called `simple-ansible`. ```bash iagctl create service ansible-playbook simple-ansible --repository gateway-resources --working-dir ansibleplaybooks --playbook hello-world.yml ``` For more information, see [iagctl create service ansible-playbook](/itential-gateway/5/iagctl/create-service-ansible-playbook) in the command reference. #### Python Use `iagctl create service python-script` to create a Python script service. The following example creates a Python script service called `simple-python` . ```bash iagctl create service python-script simple-python --repository gateway-resources --working-dir pythonscripts --filename main.py ``` If your Python script requires external libraries, place a `requirements.txt` file within the working directory. Gateway automatically manages the dependencies. For more information, see [iagctl create service python-script](/itential-gateway/5/iagctl/create-service-python-script) in the command reference. #### OpenTofu Use `iagctl create service opentofu-plan` to create an OpenTofu plan service. The following example creates an OpenTofu plan service called `simple-tofu` . ```bash iagctl create service opentofu-plan simple-tofu --repository gateway-resources --working-dir opentofuplans ``` If your OpenTofu plan uses a remote state backend such as S3 or Azure Storage, use the `--backend-config` flag to specify backend configuration at service creation time. For more information, see [iagctl create service opentofu-plan](./iagctl/create-service-opentofu-plan). For more information, see [iagctl create service opentofu-plan](/itential-gateway/5/iagctl/create-service-opentofu-plan) in the command reference.