Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 2.23 KB

ansible_playbook_task.md

File metadata and controls

66 lines (52 loc) · 2.23 KB
page_title subcategory description
morpheus_ansible_playbook_task Resource - terraform-provider-morpheus
Provides a Morpheus ansible playbook task resource

morpheus_ansible_playbook_task

Provides a Morpheus ansible playbook task resource

Example Usage

resource "morpheus_ansible_playbook_task" "ansplaybook" {
  name                = "tfansibletest"
  code                = "tfansibletest"
  labels              = ["demo", "terraform"]
  ansible_repo_id     = "5"
  git_ref             = "master"
  playbook            = "mongo_install"
  tags                = "mongo"
  skip_tags           = "web"
  command_options     = "-b"
  execute_target      = "local"
  retryable           = true
  retry_count         = 1
  retry_delay_seconds = 10
  allow_custom_config = true
}

Schema

Required

  • name (String) The name of the ansible playbook task
  • playbook (String) The name of the ansible playbook to execute

Optional

  • allow_custom_config (Boolean) Custom configuration data to pass during the execution of the ansible playbook
  • ansible_repo_id (String) The id of the ansible repo
  • code (String) The code of the ansible playbook task
  • command_options (String) Additional commands options to pass during the execution of the ansible playbook
  • execute_target (String) The target that the ansible playbook will be executed on
  • git_ref (String) The git reference of the ansible repo to pull (main, master, etc.)
  • labels (Set of String) The organization labels associated with the 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
  • skip_tags (String) The tags to skip during execution of the ansible playbook
  • tags (String) The tags to specify during execution of the ansible playbook

Read-Only

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

Import

Import is supported using the following syntax:

terraform import morpheus_ansible_playbook_task.tf_example_ansible_playbook_task 1