|
9 | 9 | magento_core_config_settings: "{{ magento_core_config_settings + _extra_items }}"
|
10 | 10 | when: magento_varnish_host | default(false, true)
|
11 | 11 |
|
| 12 | +- name: Download CA RDS |
| 13 | + ansible.builtin.get_url: |
| 14 | + url: https://truststore.pki.rds.amazonaws.com/eu-central-1/eu-central-1-bundle.pem |
| 15 | + dest: /tmp/eu-central-1-bundle.pem |
| 16 | + mode: '0666' |
| 17 | + |
12 | 18 | - name: Ensure core config database settings' values
|
13 | 19 | community.mysql.mysql_query:
|
14 |
| - login_db: "{{ mageops_app_mysql_db }}" |
| 20 | + name: "{{ mageops_app_mysql_db }}" |
| 21 | + table: core_config_data |
15 | 22 | login_host: "{{ mageops_mysql_host }}"
|
16 | 23 | login_user: "{{ mageops_app_mysql_user }}"
|
17 | 24 | login_password: "{{ mageops_app_mysql_pass }}"
|
18 |
| - query: | |
19 |
| - INSERT INTO `core_config_data` |
20 |
| - SET |
21 |
| - path = "{{ magento_db_setting.path | quote }}", |
22 |
| - value = "{{ magento_db_setting.value | quote }}", |
23 |
| - scope_id = 0, |
24 |
| - scope = "default" |
25 |
| - ON DUPLICATE KEY UPDATE |
26 |
| - value = "{{ magento_db_setting.value | quote }}" |
| 25 | + ca_cert: /tmp/eu-central-1-bundle.pem |
| 26 | + identifiers: |
| 27 | + path: "{{ magento_db_setting.path }}" |
| 28 | + values: |
| 29 | + value: "{{ magento_db_setting.value }}" |
| 30 | + defaults: |
| 31 | + scope_id: 0 |
| 32 | + scope: "default" |
27 | 33 | when: not magento_db_setting.default | default(false) and magento_db_setting.value | default(false) is string and magento_db_setting.enabled | default(true)
|
28 | 34 | loop: "{{ magento_core_config_settings }}"
|
29 | 35 | loop_control:
|
30 | 36 | loop_var: magento_db_setting
|
31 | 37 |
|
32 | 38 | - name: Ensure core config database default values (no update if exists)
|
33 | 39 | community.mysql.mysql_query:
|
34 |
| - login_db: "{{ mageops_app_mysql_db }}" |
| 40 | + name: "{{ mageops_app_mysql_db }}" |
| 41 | + table: core_config_data |
35 | 42 | login_host: "{{ mageops_mysql_host }}"
|
36 | 43 | login_user: "{{ mageops_app_mysql_user }}"
|
37 | 44 | login_password: "{{ mageops_app_mysql_pass }}"
|
38 |
| - query: | |
39 |
| - INSERT IGNORE INTO `core_config_data` |
40 |
| - SET |
41 |
| - path = "{{ magento_db_setting.path | quote }}", |
42 |
| - value = "{{ magento_db_setting.value | quote }}", |
43 |
| - scope_id = 0, |
44 |
| - scope = "default" |
| 45 | + ca_cert: /tmp/eu-central-1-bundle.pem |
| 46 | + identifiers: |
| 47 | + path: "{{ magento_db_setting.path }}" |
| 48 | + defaults: |
| 49 | + scope_id: 0 |
| 50 | + scope: "default" |
| 51 | + value: "{{ magento_db_setting.value }}" |
45 | 52 | when: magento_db_setting.default | default(false) and magento_db_setting.value | default(false) is string and magento_db_setting.enabled | default(true)
|
46 | 53 | loop: "{{ magento_core_config_settings }}"
|
47 | 54 | loop_control:
|
48 | 55 | loop_var: magento_db_setting
|
49 | 56 |
|
50 | 57 | - name: Ensure core config database settings are absent (defaults are used)
|
51 | 58 | community.mysql.mysql_query:
|
52 |
| - login_db: "{{ mageops_app_mysql_db }}" |
| 59 | + state: absent |
| 60 | + name: "{{ mageops_app_mysql_db }}" |
| 61 | + table: core_config_data |
53 | 62 | login_host: "{{ mageops_mysql_host }}"
|
54 | 63 | login_user: "{{ mageops_app_mysql_user }}"
|
55 | 64 | login_password: "{{ mageops_app_mysql_pass }}"
|
56 |
| - query: | |
57 |
| - DELETE FROM core_config_data |
58 |
| - WHERE |
59 |
| - path = "{{ magento_db_setting_path | quote }}" |
| 65 | + ca_cert: /tmp/eu-central-1-bundle.pem |
| 66 | + identifiers: |
| 67 | + path: "{{ magento_db_setting_path }}" |
60 | 68 | loop: "{{ magento_core_config_settings_to_remove }}"
|
61 | 69 | loop_control:
|
62 | 70 | loop_var: magento_db_setting_path
|
0 commit comments