Skip to content

Commit

Permalink
use synchronize instead of copy
Browse files Browse the repository at this point in the history
  • Loading branch information
iknowright committed Mar 6, 2023
1 parent 263043d commit a0f03a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
ansible_host: staging.pycon.tw
ansible_user: changchaishi
ansible_ssh_private_key_file: private.pem
ansible_python_interpreter: /usr/bin/python3
ansible_python_interpreter: /home/dev/.pyenv/shims/python
10 changes: 5 additions & 5 deletions deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
state: directory

- name: Copy entire project files to remote server
ansible.builtin.copy:
src: .
ansible.posix.synchronize:
src: ./
dest: "{{ project_dir }}"
delete: true

- name: Ensure docker network network-2023 exists
community.docker.docker_network:
name: network-2023

- name: Build and start service
community.docker.docker_compose:
project_src: web-projects/pycontw-2023-ansible
project_src: "{{ project_dir }}"
build: true
# try to build first, without up the service
state: present

state: absent

0 comments on commit a0f03a1

Please sign in to comment.