diff --git a/ansible/command_to_run.sh b/ansible/command_to_run.sh new file mode 100755 index 0000000..10d85d4 --- /dev/null +++ b/ansible/command_to_run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +ansible-playbook -l savaneprod.fr -i ./hosts.yml ./deploy_site.yml diff --git a/ansible/deploy_site.yml b/ansible/deploy_site.yml new file mode 100644 index 0000000..cf04898 --- /dev/null +++ b/ansible/deploy_site.yml @@ -0,0 +1,17 @@ +--- +- name: Déploiement de SavaneWiki + hosts: savaneprod.fr + + tasks: + - name: Remove dest files + ansible.builtin.file: + path: /volume1/web/docs/ + state: absent + + - name: Copie des fichier de site/ + ansible.builtin.copy: + dest: /volume1/web/docs/ + group: http + mode: 600 + owner: root + src: "{{ playbook_dir }}/../site/" diff --git a/ansible/hosts.yml b/ansible/hosts.yml new file mode 100644 index 0000000..52419c5 --- /dev/null +++ b/ansible/hosts.yml @@ -0,0 +1,10 @@ +--- +ungrouped: + hosts: + savaneprod.fr: + ansible_user: savane-s_Lion + ansible_ssh_private_key_file: /home/jf/savaneprod_ecdsa + ansible_become: true + ansible_python_interpreter: /usr/bin/python3 + #ansible_python_interpreter: /volume1/@appstore/python310/bin/python3 + ansible_ssh_transfer_method: scp