65 lines
1.7 KiB
YAML
65 lines
1.7 KiB
YAML
---
|
|
- name: Creation du repertoire nextcloud
|
|
file:
|
|
path: /root/nextcloud
|
|
state: directory
|
|
|
|
- name: Copie du script get_docker
|
|
copy:
|
|
src: get_docker.sh
|
|
dest: /root/nextcloud
|
|
|
|
- name: Execution du script get_docker
|
|
script: /root/nextcloud/get_docker.sh
|
|
|
|
- name: Installation de docker-compose
|
|
shell: curl -L "https://github.com/docker/compose/releases/download/1.28.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
|
|
- name: Attribution des droits de docker compose
|
|
file:
|
|
path: /usr/local/bin/docker-compose
|
|
mode: '755'
|
|
|
|
- name: Copie de docker-compose.yml
|
|
copy:
|
|
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/docker-compose.yml
|
|
dest: /root/nextcloud
|
|
|
|
- name: Execution du fichier docker-compose.yml
|
|
shell: docker-compose up -d
|
|
args:
|
|
chdir: /root/nextcloud
|
|
|
|
- name: Installation de Nginx
|
|
package:
|
|
name: nginx
|
|
state: present
|
|
|
|
- name: Copie de /etc/nginx/site-availables/proxy
|
|
copy:
|
|
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/proxy
|
|
dest: /etc/nginx/sites-available
|
|
|
|
- name: Supression de /etc/nginx/sites-enabled/default
|
|
file:
|
|
path: /etc/nginx/sites-enabled/default
|
|
state: absent
|
|
|
|
- name: Creation de lien symbolique avec /etc/nginx/sites-available/proxy dans /etc/nginx/sites-enabled/proxy
|
|
file:
|
|
src: /etc/nginx/sites-available/proxy
|
|
dest: /etc/nginx/sites-enabled/proxy
|
|
owner: root
|
|
group: root
|
|
state: link
|
|
|
|
- name: Redemmarage de Nginx
|
|
service:
|
|
name: nginx
|
|
state: restarted
|
|
|
|
- name: Copie de config.php dans /root/nextcloud/nextcloud/config
|
|
copy:
|
|
src: /root/tools/ansible/gsb2021/roles/docker-nextcloud/files/config.php
|
|
dest: /root/nextcloud/nextcloud/config
|