|
@@ -1,21 +1,29 @@
|
|
|
---
|
|
|
-- name: Implementation parameters
|
|
|
- hosts: 127.0.0.1
|
|
|
- connection: local
|
|
|
- tasks:
|
|
|
-
|
|
|
- - name: "Parameters"
|
|
|
- command: "docker-compose exec {{ item }} bash -c \"cp /opt/{{ item }}/app/config/parameters.yml.dist /opt/{{ item }}/app/config/parameters.yml\""
|
|
|
- with_items: "{{ lookup('env', 'MODULES_INSTALL').split(',') }}"
|
|
|
-
|
|
|
-# - name: Parameters for base
|
|
|
-# command: "cp {{ playbook_dir }}/kea/conf/kea-dhcp4.conf.dist {{ playbook_dir }}/kea/conf/kea-dhcp4.conf"
|
|
|
+# - name: Implementation parameters
|
|
|
+# hosts: 127.0.0.1
|
|
|
+# connection: local
|
|
|
+# tasks:
|
|
|
+# - name: Parameters for base
|
|
|
+# command: "cp {{ playbook_dir }}/base/app/config/parameters.yml.dist {{ playbook_dir }}/base/app/config/parameters.yml"
|
|
|
+#
|
|
|
+# - name: "Parameters"
|
|
|
+# command: "cp {{ playbook_dir }}/{{ item }}/app/config/parameters.yml.dist {{ playbook_dir }}/{{ item }}/app/config/parameters.yml"
|
|
|
+# with_items: "{{ lookup('env', 'MODULES_INSTALL').split(',') }}"
|
|
|
+#
|
|
|
+# - name: Parameters for base
|
|
|
+ command: "cp {{ playbook_dir }}/kea/conf/kea-dhcp4.conf.dist {{ playbook_dir }}/kea/conf/kea-dhcp4.conf"
|
|
|
|
|
|
- name: Launch docker for mysql database. Tag=start_mysql
|
|
|
hosts: 127.0.0.1
|
|
|
connection: local
|
|
|
tags: start_mysql
|
|
|
tasks:
|
|
|
+# - name: Docker build
|
|
|
+# command: "docker-compose build"
|
|
|
+#
|
|
|
+# - name: Docker build mysql
|
|
|
+# command: "docker-compose pull mysql"
|
|
|
+
|
|
|
- name: Docker mysql up
|
|
|
command: "docker-compose up -d --force-recreate mysql"
|
|
|
|
|
@@ -152,12 +160,12 @@
|
|
|
tasks:
|
|
|
- name: Docker base up
|
|
|
command: "docker-compose up -d --force-recreate base"
|
|
|
-# - name: "Wait for autoload_classmap.php. Timeout: 10 minutes"
|
|
|
-# wait_for:
|
|
|
-# path: "{{ playbook_dir }}/base/vendor/composer/autoload_classmap.php"
|
|
|
-# state: present
|
|
|
-# sleep: 30
|
|
|
-# timeout: 600
|
|
|
+ # - name: "Wait for autoload_classmap.php. Timeout: 10 minutes"
|
|
|
+ # wait_for:
|
|
|
+ # path: "{{ playbook_dir }}/base/vendor/composer/autoload_classmap.php"
|
|
|
+ # state: present
|
|
|
+ # sleep: 30
|
|
|
+ # timeout: 600
|
|
|
|
|
|
- name: Configure module base. Tag=configure_base
|
|
|
hosts: base
|
|
@@ -166,20 +174,25 @@
|
|
|
vars:
|
|
|
uris: ""
|
|
|
tasks:
|
|
|
+ - name: "Wait for autoload_classmap.php. Timeout: 10 minutes"
|
|
|
+ wait_for:
|
|
|
+ path: "/opt/base/vendor/composer/autoload_classmap.php"
|
|
|
+ state: present
|
|
|
+ sleep: 30
|
|
|
+ timeout: 600
|
|
|
- name: Chmod cache
|
|
|
- command: "docker-compose exec base bin/composer-install.sh"
|
|
|
-# file:
|
|
|
-# path: /opt/base/var/cache/
|
|
|
-# recurse: yes
|
|
|
-# mode: 777
|
|
|
+ file:
|
|
|
+ path: /opt/base/var/cache/
|
|
|
+ recurse: yes
|
|
|
+ mode: 777
|
|
|
|
|
|
-# - name: Clean cache
|
|
|
-# file:
|
|
|
-# state: absent
|
|
|
-# path: "/opt/base/var/cache/"
|
|
|
+ - name: Clean cache
|
|
|
+ file:
|
|
|
+ state: absent
|
|
|
+ path: "/opt/base/var/cache/"
|
|
|
|
|
|
-# - name: Composer install
|
|
|
-# shell: "eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-interaction"
|
|
|
+ - name: Composer install
|
|
|
+ shell: "eval $(ssh-agent) ; ssh-add /opt/keys/bitbucket.id_rsa ; composer install --no-interaction"
|
|
|
|
|
|
- name: Load redirections
|
|
|
set_fact:
|
|
@@ -192,11 +205,10 @@
|
|
|
with_items: "{{ lookup('env', 'MODULES_INSTALL').split(',') }}"
|
|
|
|
|
|
- name: Create oauth client
|
|
|
- shell: "docker-compose exec base bin/console oauth:client:createRedirects {{ uris }} > oauth.data.log"
|
|
|
+ shell: "bin/console oauth:client:createRedirects {{ uris }} > oauth.data.log"
|
|
|
args:
|
|
|
executable: /bin/bash
|
|
|
|
|
|
-
|
|
|
- name: Update variable usersetting
|
|
|
set_fact:
|
|
|
usersetting: "{{ lookup('file', '{{ playbook_dir }}/user_system.json')|from_json }}"
|
|
@@ -251,7 +263,6 @@
|
|
|
- name: "Docker's schema update"
|
|
|
wait_for:
|
|
|
path: "./vendor/composer/autoload_classmap.php"
|
|
|
- #path: "/opt/{{ play_hosts }}/vendor/composer/autoload_classmap.php"
|
|
|
state: present
|
|
|
sleep: 30
|
|
|
timeout: 600
|
|
@@ -283,7 +294,6 @@
|
|
|
- name: "Copy certs directory"
|
|
|
shell: "cp -nr /opt/flowdat/certs/* /opt/flowdat/extra/nginx/certs"
|
|
|
|
|
|
-
|
|
|
- name: "Run up all. Tag=up_all"
|
|
|
hosts: 127.0.0.1
|
|
|
connection: local
|