{"id":19508814,"url":"https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible","last_synced_at":"2025-04-26T03:31:46.235Z","repository":{"id":49892114,"uuid":"267393630","full_name":"rhythmictech/terraform-aws-imagebuilder-component-ansible","owner":"rhythmictech","description":"Create an EC2 Image Builder component that runs an Ansible playbook","archived":false,"fork":false,"pushed_at":"2024-04-22T20:44:33.000Z","size":95,"stargazers_count":4,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T07:11:12.015Z","etag":null,"topics":["ansible","aws","cloudformation","ec2","imagebuilder","terraform","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/rhythmictech/imagebuilder-component-ansible/aws","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhythmictech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-05-27T18:15:40.000Z","updated_at":"2024-12-11T01:08:17.000Z","dependencies_parsed_at":"2024-04-22T21:57:58.200Z","dependency_job_id":null,"html_url":"https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-imagebuilder-component-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-imagebuilder-component-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-imagebuilder-component-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhythmictech%2Fterraform-aws-imagebuilder-component-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhythmictech","download_url":"https://codeload.github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250926813,"owners_count":21509041,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","aws","cloudformation","ec2","imagebuilder","terraform","terraform-module"],"created_at":"2024-11-10T23:09:56.691Z","updated_at":"2025-04-26T03:31:45.932Z","avatar_url":"https://github.com/rhythmictech.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-imagebuilder-component-ansible\nTemplate repository for terraform modules. Good for any cloud and any provider.\n\n[![tflint](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/workflows/tflint/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/actions?query=workflow%3Atflint+event%3Apush+branch%3Amaster)\n[![tfsec](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/workflows/tfsec/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/actions?query=workflow%3Atfsec+event%3Apush+branch%3Amaster)\n[![yamllint](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/workflows/yamllint/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/actions?query=workflow%3Ayamllint+event%3Apush+branch%3Amaster)\n[![misspell](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/workflows/misspell/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/actions?query=workflow%3Amisspell+event%3Apush+branch%3Amaster)\n[![pre-commit-check](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/workflows/pre-commit-check/badge.svg?branch=master\u0026event=push)](https://github.com/rhythmictech/terraform-aws-imagebuilder-component-ansible/actions?query=workflow%3Apre-commit-check+event%3Apush+branch%3Amaster)\n\u003ca href=\"https://twitter.com/intent/follow?screen_name=RhythmicTech\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/RhythmicTech?style=social\u0026logo=twitter\" alt=\"follow on Twitter\"\u003e\u003c/a\u003e\n\nTerraform module that creates EC2 Image Builder components using ansible\n## Example\n```hcl\ndata \"aws_caller_identity\" \"current\" {\n}\n\nlocals {\n  account_id = data.aws_caller_identity.current.account_id\n  tags       = module.tags.tags_no_name\n}\n\nmodule \"tags\" {\n  source = \"git::https://github.com/rhythmictech/terraform-terraform-tags.git?ref=v1.0.0\"\n\n  names = [\n    \"smiller\",\n    \"imagebuilder-test\"\n  ]\n\n  tags = merge({\n    \"Env\"       = \"test\"\n    \"Namespace\" = \"smiller\"\n    \"notes\"     = \"Testing only - Can be safely deleted\"\n    \"Owner\"     = var.owner\n  }, var.additional_tags)\n}\n\nmodule \"component_ansible_setup\" {\n  source  = \"rhythmictech/imagebuilder-component-ansible-setup/aws\"\n  version = \"~\u003e 1.0.0-rc1\"\n\n  component_version = \"1.0.0\"\n  description       = \"Testing ansible setup\"\n  name              = \"testing-setup-component\"\n  tags              = local.tags\n}\n\nmodule \"component_ansible\" {\n  source  = \"rhythmictech/imagebuilder-component-ansible/aws\"\n  version = \"~\u003e 2.0.0-rc1\"\n\n  component_version = \"1.0.0\"\n  description       = \"Testing component\"\n  name              = \"testing-component\"\n  tags              = local.tags\n}\n\nmodule \"test_recipe\" {\n  source  = \"rhythmictech/imagebuilder-recipe/aws\"\n  version = \"~\u003e 0.2.0\"\n\n  description    = \"Testing recipe\"\n  name           = \"test-recipe\"\n  parent_image   = \"arn:aws:imagebuilder:us-east-1:aws:image/amazon-linux-2-x86/x.x.x\"\n  recipe_version = \"1.0.0\"\n  tags           = local.tags\n  update         = true\n\n  component_arns = [\n    module.component_ansible_setup.component_arn,\n    module.component_ansible.component_arn,\n    \"arn:aws:imagebuilder:us-east-1:aws:component/simple-boot-test-linux/1.0.0/1\",\n    \"arn:aws:imagebuilder:us-east-1:aws:component/reboot-test-linux/1.0.0/1\"\n  ]\n}\n\nmodule \"test_pipeline\" {\n  source  = \"rhythmictech/imagebuilder-pipeline/aws\"\n  version = \"~\u003e 0.3.0\"\n\n  description = \"Testing pipeline\"\n  name        = \"test-pipeline\"\n  tags        = local.tags\n  recipe_arn  = module.test_recipe.recipe_arn\n  public      = false\n}\n\n```\n\n## About\nThis module allows creation of an Ansible Playbook component for use in EC2 Image Builder Recipes.\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 0.14 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | \u003e= 4.22.0 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | \u003e= 4.22.0 |\n\n## Modules\n\nNo modules.\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_imagebuilder_component.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/imagebuilder_component) | resource |\n| [aws_caller_identity.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/caller_identity) | data source |\n| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |\n| [aws_secretsmanager_secret.ssh_key](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/secretsmanager_secret) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_ansible_use_venv\"\u003e\u003c/a\u003e [ansible\\_use\\_venv](#input\\_ansible\\_use\\_venv) | Whether or not ansible should be run in a virtual environment | `bool` | `true` | no |\n| \u003ca name=\"input_ansible_venv_path\"\u003e\u003c/a\u003e [ansible\\_venv\\_path](#input\\_ansible\\_venv\\_path) | Path at which to create the ansible virtual environment | `string` | `\"/var/tmp/ansible_venv/\"` | no |\n| \u003ca name=\"input_change_description\"\u003e\u003c/a\u003e [change\\_description](#input\\_change\\_description) | description of changes since last version | `string` | `null` | no |\n| \u003ca name=\"input_component_version\"\u003e\u003c/a\u003e [component\\_version](#input\\_component\\_version) | Version of the component | `string` | n/a | yes |\n| \u003ca name=\"input_data_uri\"\u003e\u003c/a\u003e [data\\_uri](#input\\_data\\_uri) | Use this to override the component document with one at a particualar URL endpoint | `string` | `null` | no |\n| \u003ca name=\"input_description\"\u003e\u003c/a\u003e [description](#input\\_description) | description of component | `string` | `null` | no |\n| \u003ca name=\"input_kms_key_id\"\u003e\u003c/a\u003e [kms\\_key\\_id](#input\\_kms\\_key\\_id) | KMS key to use for encryption | `string` | `null` | no |\n| \u003ca name=\"input_name\"\u003e\u003c/a\u003e [name](#input\\_name) | name to use for component | `string` | n/a | yes |\n| \u003ca name=\"input_platform\"\u003e\u003c/a\u003e [platform](#input\\_platform) | platform of component (Linux or Windows) | `string` | `\"Linux\"` | no |\n| \u003ca name=\"input_playbook_dir\"\u003e\u003c/a\u003e [playbook\\_dir](#input\\_playbook\\_dir) | directory where playbook and requirements are found (if not root of repo) | `string` | `null` | no |\n| \u003ca name=\"input_playbook_file\"\u003e\u003c/a\u003e [playbook\\_file](#input\\_playbook\\_file) | path to playbook file, relative to `playbook_dir` | `string` | `\"provision.yml\"` | no |\n| \u003ca name=\"input_playbook_repo\"\u003e\u003c/a\u003e [playbook\\_repo](#input\\_playbook\\_repo) | git url for repo where ansible code lives with provisioning playbook and requirements file\u003cbr\u003ecan append with `-b BRANCH_NAME` to clone a specific branch | `string` | n/a | yes |\n| \u003ca name=\"input_ssh_key_secret_arn\"\u003e\u003c/a\u003e [ssh\\_key\\_secret\\_arn](#input\\_ssh\\_key\\_secret\\_arn) | ARN of a secretsmanager secret containing an SSH key (use arn OR name, not both) | `string` | `null` | no |\n| \u003ca name=\"input_ssh_key_secret_name\"\u003e\u003c/a\u003e [ssh\\_key\\_secret\\_name](#input\\_ssh\\_key\\_secret\\_name) | Name of a secretsmanager secret containing an SSH key (use arn OR name, not both) | `string` | `null` | no |\n| \u003ca name=\"input_supported_os_versions\"\u003e\u003c/a\u003e [supported\\_os\\_versions](#input\\_supported\\_os\\_versions) | A set of operating system versions supported by the component. If the OS information is available, a prefix match is performed against the base image OS version during image recipe creation. | `set(string)` | `null` | no |\n| \u003ca name=\"input_tags\"\u003e\u003c/a\u003e [tags](#input\\_tags) | map of tags to use for CFN stack and component | `map(string)` | `{}` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_component_arn\"\u003e\u003c/a\u003e [component\\_arn](#output\\_component\\_arn) | ARN of the EC2 Image Builder Component |\n| \u003ca name=\"output_latest_minor_version_arn\"\u003e\u003c/a\u003e [latest\\_minor\\_version\\_arn](#output\\_latest\\_minor\\_version\\_arn) | ARN of the EC2 Image Builder Component |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n\n## The Giants underneath this module\n- pre-commit.com/\n- terraform.io/\n- github.com/tfutils/tfenv\n- github.com/segmentio/terraform-docs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-imagebuilder-component-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhythmictech%2Fterraform-aws-imagebuilder-component-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhythmictech%2Fterraform-aws-imagebuilder-component-ansible/lists"}