parent
68527d7c96
commit
e0c27f6649
|
@ -1,35 +0,0 @@
|
||||||
version: 2
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
working_directory: ~/oliverdavies-uk
|
|
||||||
docker:
|
|
||||||
- image: ansible/ansible:ubuntu1604
|
|
||||||
environment:
|
|
||||||
ANSIBLE_HOST_KEY_CHECKING: no
|
|
||||||
steps:
|
|
||||||
# Installation
|
|
||||||
- run:
|
|
||||||
name: Install System Packages
|
|
||||||
command: pip install --upgrade pip && pip install ansible
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
- checkout
|
|
||||||
- restore_cache:
|
|
||||||
key: oliverdavies-uk-{{ .Branch }}-{{ checksum "./tools/ansible/requirements.yml" }}-v1
|
|
||||||
- run: ansible-galaxy install -r tools/ansible/requirements.yml
|
|
||||||
- save_cache:
|
|
||||||
key: oliverdavies-uk-{{ .Branch }}-{{ checksum "./tools/ansible/requirements.yml" }}-v1
|
|
||||||
paths:
|
|
||||||
- '/root/.ansible/roles'
|
|
||||||
|
|
||||||
# Deploy
|
|
||||||
- run: echo $ANSIBLE_VAULT_PASS > ./tools/ansible/.vault-pass.txt
|
|
||||||
- run: ansible-playbook tools/ansible/deploy.yml --vault-password-file=./tools/ansible/.vault-pass.txt
|
|
||||||
- run: rm ./tools/ansible/.vault-pass.txt
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
build_test_and_deploy:
|
|
||||||
jobs:
|
|
||||||
- deploy
|
|
Loading…
Reference in a new issue