File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,11 @@ phases:
4545 - eval "$(ssh-agent -s)"
4646 - ssh-add ~/.ssh/git_rsa
4747 %{ ~ endif ~}
48+ # activate venv
49+ - source ${ ansible_venv_path} /bin/activate
4850 # Install playbook dependencies
49- - ansible-galaxy install -f -r requirements.yml || true
51+ - ansible-galaxy role install -f -r requirements.yml || true
52+ - ansible-galaxy collection install -f -r requirements.yml || true
5053 # Wait for cloud-init
5154 - while [ ! -f /var/lib/cloud/instance/boot-finished ]; do echo 'Waiting for cloud-init...'; sleep 1; done
5255 # Work around for missing environment
Original file line number Diff line number Diff line change @@ -3,14 +3,15 @@ locals {
33 latest_component_minor_version = " ${ split (" ." , var. component_version )[0 ]} .${ split (" ." , var. component_version )[1 ]} .x"
44
55 data = templatefile (" ${ path . module } /component.yml.tpl" , {
6- description = var.description
7- name = var.name
8- playbook_dir = var.playbook_dir
9- playbook_file = var.playbook_file
10- playbook_repo = var.playbook_repo
11- repo_host = try (local. repo_parts . host , null )
12- repo_port = coalesce (local. repo_parts . port , 22 )
13- ssh_key_name = try (data. aws_secretsmanager_secret . ssh_key [0 ]. name , null )
6+ ansible_venv_path = var.ansible_venv_path
7+ description = var.description
8+ name = var.name
9+ playbook_dir = var.playbook_dir
10+ playbook_file = var.playbook_file
11+ playbook_repo = var.playbook_repo
12+ repo_host = try (local. repo_parts . host , null )
13+ repo_port = coalesce (local. repo_parts . port , 22 )
14+ ssh_key_name = try (data. aws_secretsmanager_secret . ssh_key [0 ]. name , null )
1415 })
1516
1617 repo_parts = try (
Original file line number Diff line number Diff line change 1+ variable "ansible_venv_path" {
2+ default = " /var/tmp/ansible_venv/"
3+ description = " Path at which to create the ansible virtual environment"
4+ type = string
5+ }
6+
17variable "change_description" {
28 default = null
39 description = " description of changes since last version"
You can’t perform that action at this time.
0 commit comments