@@ -38,14 +38,14 @@ jobs:
38
38
run : ansible --version
39
39
40
40
- name : Decrypt ansible files
41
- working-directory : infra/vagrant
41
+ working-directory : infra/ansible
42
42
env :
43
43
# https://docs.github.com/en/actions/security-guides/encrypted-secrets#using-encrypted-secrets-in-a-workflow
44
44
VAULT_PASSWORD : ${{ secrets.VAULT_PASSWORD }}
45
45
run : |
46
46
printf '%s' "$VAULT_PASSWORD" >vault-pass.txt
47
47
48
- for FILENAME in provisioning/ vars/prod.yml provisioning/ coder_rsa; do
48
+ for FILENAME in vars/prod.yml coder_rsa; do
49
49
echo "Decrypting ${FILENAME}.enc to $FILENAME"
50
50
ansible-vault decrypt \
51
51
--vault-password-file vault-pass.txt \
@@ -54,27 +54,27 @@ jobs:
54
54
done
55
55
56
56
- name : Install required collections
57
- working-directory : infra/vagrant
58
- run : ansible-galaxy role install --role-file requirements.yml --roles-path provisioning/ roles
57
+ working-directory : infra/ansible
58
+ run : ansible-galaxy role install --role-file requirements.galaxy. yml --roles-path roles
59
59
60
60
- name : Run ansible in syntax check mode
61
- working-directory : infra/vagrant
62
- run : ansible-playbook provisioning/ prod.yml -i provisioning/ prod.inventory --syntax-check
61
+ working-directory : infra/ansible
62
+ run : ansible-playbook prod.yml -i prod.inventory --syntax-check
63
63
64
64
- name : Run ansible
65
- working-directory : infra/vagrant
65
+ working-directory : infra/ansible
66
66
env :
67
67
# Disable host key checking to suppress interactive prompt.
68
68
# See: https://docs.ansible.com/ansible/2.10/user_guide/connection_details.html#managing-host-key-checking
69
69
ANSIBLE_HOST_KEY_CHECKING : ' False'
70
70
# See: https://docs.ansible.com/ansible/2.10/reference_appendices/config.html#envvar-ANSIBLE_PRIVATE_KEY_FILE
71
- ANSIBLE_PRIVATE_KEY_FILE : ' provisioning/ coder_rsa'
72
- run : ansible-playbook provisioning/ prod.yml -i provisioning/ prod.inventory
71
+ ANSIBLE_PRIVATE_KEY_FILE : ' coder_rsa'
72
+ run : ansible-playbook prod.yml -i prod.inventory
73
73
74
74
- name : Cleanup
75
75
if : always()
76
- working-directory : infra/vagrant
76
+ working-directory : infra/ansible
77
77
run : |
78
- for FILE in vault-pass.txt provisioning/ vars/prod.yml provisioning/ coder_rsa; do
78
+ for FILE in vault-pass.txt vars/prod.yml coder_rsa; do
79
79
[ ! -f "$FILE" ] || rm -fv "$FILE"
80
80
done
0 commit comments