Skip to content

Commit

Permalink
Merge branch 'improvement/add_ansible_provisioner_for_bod_bastion' in…
Browse files Browse the repository at this point in the history
…to testing/redeployment_updates
  • Loading branch information
mcdonnnj committed Oct 6, 2023
2 parents 09e3497 + 13662dd commit e097779
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ terraform apply -var-file=<your_workspace>.tfvars

| Name | Source | Version |
|------|--------|---------|
| bod\_bastion\_ansible\_provisioner | github.com/cloudposse/terraform-null-ansible | n/a |
| bod\_docker\_ansible\_provisioner | github.com/cloudposse/terraform-null-ansible | n/a |
| cyhy\_bastion\_ansible\_provisioner | github.com/cloudposse/terraform-null-ansible | n/a |
| cyhy\_dashboard\_ansible\_provisioner | github.com/cloudposse/terraform-null-ansible | n/a |
Expand Down
16 changes: 16 additions & 0 deletions terraform/bod_bastion_ec2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,19 @@ resource "aws_instance" "bod_bastion" {
},
)
}

# Provision the bastion EC2 instance via Ansible
module "bod_bastion_ansible_provisioner" {
source = "github.com/cloudposse/terraform-null-ansible"

arguments = [
"--user=${var.remote_ssh_user}",
"--ssh-common-args='-o StrictHostKeyChecking=no'",
]
envs = [
"host=${aws_instance.bod_bastion.public_ip}",
"host_groups=bod_bastion",
]
playbook = "../ansible/playbook.yml"
dry_run = false
}

0 comments on commit e097779

Please sign in to comment.