cbax_dev/deploy.playbook.yml
2024-10-22 18:48:53 -04:00

23 lines
604 B
YAML

- name: cbax dev deploy
hosts: containers
tasks:
- name: Copy files
ansible.posix.synchronize:
src: "{{playbook_dir}}/"
dest: "/root/cbax_dev"
- name: Move assets
ansible.builtin.copy:
remote_src: true
src: /root/cbax_dev/static/
dest: /srv/http/cbax_dev/
- name: Tear down existing service
ansible.builtin.command: "docker compose down --rmi all"
args:
chdir: "$HOME/cbax_dev"
- name: Create the new container
ansible.builtin.command: "docker compose up -d"
args:
chdir: "$HOME/cbax_dev"