diff --git a/README.md b/README.md index 979a1ab..f403636 100644 --- a/README.md +++ b/README.md @@ -82,3 +82,4 @@ ssh-copy-id -p 2222 bapasqui@localhost ### Ressources https://zenn.dev/zenogawa/articles/gitea_keycloak?locale=en +https://caddyserver.com/docs/ diff --git a/ansible/playbooks/install.yml b/ansible/playbooks/install.yml index 8dfe174..824f097 100644 --- a/ansible/playbooks/install.yml +++ b/ansible/playbooks/install.yml @@ -21,3 +21,6 @@ - name: Include Docker installation tasks include_tasks: tasks/docker.yml + + - name: Copy the project to the VM + include_tasks: tasks/copy-to-vm.yml diff --git a/ansible/playbooks/tasks/copy-to-vm.yml b/ansible/playbooks/tasks/copy-to-vm.yml new file mode 100644 index 0000000..4f405ed --- /dev/null +++ b/ansible/playbooks/tasks/copy-to-vm.yml @@ -0,0 +1,25 @@ +--- +- name: Install rsync + apt: + name: rsync + state: present + become: yes + +- name: Ensure project directory exists + file: + path: "/home/{{ ansible_user }}/projects/ft_chatons" + state: directory + mode: '0755' + become: no + +- name: Sync project files to VM + synchronize: + src: "{{ playbook_dir }}/../../" + dest: "/home/{{ ansible_user }}/projects/ft_chatons/" + delete: yes + rsync_opts: + - "--exclude=.git" + - "--exclude=.vscode" + - "--exclude=ansible" + - "--exclude=*.qcow2" + become: no \ No newline at end of file