decorrelation SITE et sous domain
[lhc/ansible.git] / tasks / config_options_www.yml
diff --git a/tasks/config_options_www.yml b/tasks/config_options_www.yml
new file mode 100644 (file)
index 0000000..8f4a943
--- /dev/null
@@ -0,0 +1,46 @@
+- name: Bloc demande sous-domaine
+  block:
+
+    - name: Demande sous-domaine
+      ansible.builtin.pause:
+        prompt: 'quel sous-domaine faut-il configurer?(ex: www/gestion)'
+        echo: true
+      register: config_ss_domain_promp
+
+    - name: Definir config_ss_domain
+      ansible.builtin.set_fact:
+        config_ss_domain: "{{ config_ss_domain_promp.user_input | default(SITE) }}"
+
+- name: Bloc demande des autres options
+  when: SITE != 'WP' and SITE != 'paheko'
+  block:
+
+    - name: Demande php
+      ansible.builtin.pause:
+        prompt: 'Faut-il configurer un pool PHP?(ex: oui/non)'
+        echo: true
+      register: config_php_promp
+
+    - name: Definir config_php
+      ansible.builtin.set_fact:
+        config_php: "{{ config_php_promp.user_input | default('non') }}"
+
+    - name: Demande bdd
+      ansible.builtin.pause:
+        prompt: 'Faut-il configurer une base de données SQL?(ex: mariadb/postgres/non)'
+        echo: true
+      register: config_bdd_promp
+
+    - name: Definir config_bdd
+      ansible.builtin.set_fact:
+        config_bdd: "{{ config_bdd_promp.user_input | default('non') }}"
+
+    - name: Demande sftp_key
+      ansible.builtin.pause:
+        prompt: 'besoin de configurer un accès SFTP pour ce compte (vide ou clé public)'
+        echo: true
+      register: sftp_key_promp
+
+    - name: Definir sftp_key
+      ansible.builtin.set_fact:
+        sftp_key: "{{ sftp_key_promp.user_input | default('non') }}"