correction dans les option par defaut des promps
[lhc/ansible.git] / tasks / config_options_www.yml
1 - name: Demande sous-domaine
2 tags: https
3 ansible.builtin.pause:
4 prompt: 'quel sous-domaine faut-il configurer?(ex: www/gestion)'
5 echo: true
6 default: '{{ SITE }}'
7 register: config_ss_domain_promp
8 when: SITE != 'nuage'
9
10 - name: Bloc demande des autres options
11 when: SITE != 'paheko' and SITE != 'nuage' and SITE != 'WP'
12 block:
13
14 - name: Demande php
15 ansible.builtin.pause:
16 prompt: 'Faut-il configurer un pool PHP?(oui/non)'
17 echo: true
18 register: config_php_promp
19
20 - name: Demande bdd
21 ansible.builtin.pause:
22 prompt: 'Faut-il configurer une base de données SQL?(ex: mariadb/postgres/non)'
23 echo: true
24 register: config_bdd_promp
25
26 - name: Demande sftp_key
27 ansible.builtin.pause:
28 prompt: 'besoin de configurer un accès SFTP pour ce compte (vide ou clé public)'
29 echo: true
30 register: sftp_key_promp
31
32 - name: Definir config_php
33 ansible.builtin.set_fact:
34 config_php: "{{ ( config_php_promp.user_input | default ('') | length == 0 ) | ternary ('non', config_php_promp.user_input) }}"
35
36 - name: Definir config_ss_domain
37 tags: https
38 ansible.builtin.set_fact:
39 config_ss_domain: "{{ ( SITE == 'nuage' | default ('') ) | ternary (SITE, config_ss_domain_promp.user_input) }}"
40
41 - name: Definir config_bdd
42 ansible.builtin.set_fact:
43 config_bdd: "{{ ( config_bdd_promp.user_input | default ('') | length == 0 ) | ternary ('non', config_bdd_promp.user_input) }}"
44
45 - name: Definir sftp_key
46 ansible.builtin.set_fact:
47 sftp_key: "{{ sftp_key_promp.user_input | default('non') }}"