- Update deploy job to use file variables
- Fix truncating values with exotic characters
This commit is contained in:
Sonny Bakker 2020-09-01 22:07:49 +02:00
parent b035526848
commit f0df342f61
4 changed files with 41 additions and 8 deletions

View file

@ -9,15 +9,12 @@ deploy:
before_script:
- pip install ansible --quiet
- git clone https://git.fudiggity.nl/sonny/ansible-playbooks.git deployment
- mkdir -p /root/.ssh
- echo "$DEPLOY_HOST_KEY" > /root/.ssh/known_hosts
- echo "$DEPLOY_KEY" > deployment/deploy_key && chmod 0600 deployment/deploy_key
- echo "$VAULT_PASSWORD" > deployment/vault && chmod 0600 deployment/vault
- mkdir /root/.ssh && echo "$DEPLOY_HOST_KEY" > /root/.ssh/known_hosts
script:
- >
ansible-playbook deployment/playbook.yml
--inventory deployment/apps.yml
--limit newsreader
--user ansible
--private-key deployment/deploy_key
--vault-password-file deployment/vault
--private-key "$DEPLOY_KEY"
--vault-password-file "$VAULT_FILE"