Skip to content

Latest commit

 

History

History
80 lines (63 loc) · 3.05 KB

ansible_tower_task.md

File metadata and controls

80 lines (63 loc) · 3.05 KB
page_title subcategory description
morpheus_ansible_tower_task Resource - terraform-provider-morpheus
Provides a Morpheus vRealize Orchestrator (vRO) task resource

morpheus_ansible_tower_task

Provides a Morpheus vRealize Orchestrator (vRO) task resource

Example Usage

data "morpheus_ansible_tower_inventory" "example_ansible_tower_inventory" {
  name = "Demo Inventory"
}

data "morpheus_ansible_tower_job_template" "example_ansible_tower_job_template" {
  name = "Demo Job Template"
}

data "morpheus_integration" "tf_example_ansible_tower_integration" {
  name = "Demo Ansible Tower"
}

resource "morpheus_ansible_tower_task" "tfexample_ansible_tower_task" {
  name                         = "tfexample_ansible_tower_task"
  code                         = "tfexample-ansible-tower-task"
  labels                       = ["demo", "terraform"]
  ansible_tower_integration_id = data.morpheus_integration.tf_example_ansible_tower_integration.id
  ansible_tower_inventory_id   = data.morpheus_ansible_tower_inventory.example_ansible_tower_inventory.id
  group                        = "demo"
  job_template_id              = data.morpheus_ansible_tower_job_template.example_ansible_tower_job_template.id
  scm_override                 = "main"
  execute_mode                 = "executeAll"
  execute_target               = "local"
  retryable                    = true
  retry_count                  = 5
  retry_delay_seconds          = 10
  allow_custom_config          = true
  visibility                   = "public"
}

Schema

Required

  • ansible_tower_integration_id (Number) The ID of the ansible tower integration
  • ansible_tower_inventory_id (Number) The ID of the ansible tower inventory
  • execute_mode (String) The ansible tower execution mode (executeHost, executeGroup, executeAll, off)
  • job_template_id (Number) The ID of the ansible tower job template
  • name (String) The name of the ansible tower task

Optional

  • allow_custom_config (Boolean) Custom configuration data to pass during the execution of the ansible tower job task
  • code (String) The code of the ansible tower task
  • execute_target (String) The target that the ansible tower job will be executed on (local, remote, resource)
  • group (String) The name of a new or existing group in the inventory
  • labels (Set of String) The organization labels associated with the ansible tower task (Only supported on Morpheus 5.5.3 or higher)
  • retry_count (Number) The number of times to retry the task if there is a failure
  • retry_delay_seconds (Number) The number of seconds to wait between retry attempts
  • retryable (Boolean) Whether to retry the task if there is a failure
  • scm_override (String) The git reference override
  • visibility (String) The visibility of the ansible tower task (public or private)

Read-Only

  • id (String) The ID of the ansible tower task

Import

Import is supported using the following syntax:

terraform import morpheus_ansible_tower_task.tf_example_ansible_tower_task 1