Skip to content

Commit

Permalink
Use YAML formatted ansible host config
Browse files Browse the repository at this point in the history
  • Loading branch information
marteinn committed Feb 25, 2024
1 parent ab29d79 commit e800b64
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ jobs:
. venv/bin/activate
if [ "${CIRCLE_BRANCH}" == "develop" ]; then
ansible-playbook deploy.yml -i stages/stage
ansible-playbook deploy.yml -i stages/stage.yml
fi
if [ "${CIRCLE_TAG}" ]; then
ansible-playbook deploy.yml -i stages/prod
ansible-playbook deploy.yml -i stages/prod.yml
fi
workflows:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add Circle CI executors
- Bump actions/checkout to v4
- Upgrade Phoenix to 1.7
- Use YAML formatted ansible host config

### Removed

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ This is a Phoenix/Elixir boilerplate that includes a auto-setup, docker support
#### Deploy application
- Stage: `ansible-playbook deploy.yml -i stages/stage`
- Prod: `ansible-playbook deploy.yml -i stages/prod`
- Stage: `ansible-playbook deploy.yml -i stages/stage.yml`
- Prod: `ansible-playbook deploy.yml -i stages/prod.yml`
## Style Guide
Expand Down
3 changes: 0 additions & 3 deletions deploy/stages/prod

This file was deleted.

7 changes: 7 additions & 0 deletions deploy/stages/prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
webservers:
hosts:
prod1:
ansible_user: deploy
ansible_port: 22
ansible_host: example.com
stage_name: prod
2 changes: 0 additions & 2 deletions deploy/stages/stage

This file was deleted.

7 changes: 7 additions & 0 deletions deploy/stages/stage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
webservers:
hosts:
stage1:
ansible_user: deploy
ansible_port: 22
ansible_host: stage.example.com
stage_name: stage

0 comments on commit e800b64

Please sign in to comment.