File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,11 @@ jobs:
6161 run : |
6262 ansible-playbook -i "localhost ansible_connection=local", ansible/playbook-gcp-vm-create.yaml
6363
64- # TODO: move this out of the playbook, so it can be reused.
6564 - name : Run Ansible playbook on the VM
6665 run : |
67- ansible-playbook -i inventory.ini ansible/playbook.yaml
66+ ansible-playbook -i /tmp/ inventory.ini ansible/playbook.yaml
6867
69- - name : Always runs after failure
68+ - name : Always delete VM after failure
7069 if : failure()
7170 env :
7271 GCP_PROJECT_ID : ${{ env.GCP_PROJECT_ID }}
Original file line number Diff line number Diff line change 2020 mode : ' 0600'
2121
2222 - name : Install Python packages into Ansible's pipx venv
23+ # Base on: https://github.com/ansible-collections/google.cloud/blob/master/requirements.txt
2324 ansible.builtin.command :
2425 cmd : " {{ ansible_playbook_python }} -m pip install requests google-auth google-cloud-storage"
2526 changed_when : true
7677 content : |
7778 [gcp]
7879 {{ external_ip }} ansible_user={{ ansible_user }} ansible_ssh_private_key_file=~/.ssh/id_rsa
79- dest : inventory.ini
80+ dest : /tmp/ inventory.ini
You can’t perform that action at this time.
0 commit comments