Ajout du déploiement par ansible
This commit is contained in:
2
ansible/command_to_run.sh
Executable file
2
ansible/command_to_run.sh
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
ansible-playbook -l savaneprod.fr -i ./hosts.yml ./deploy_site.yml
|
||||||
17
ansible/deploy_site.yml
Normal file
17
ansible/deploy_site.yml
Normal file
@@ -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/"
|
||||||
10
ansible/hosts.yml
Normal file
10
ansible/hosts.yml
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user