|
12 | 12 | - "../../../src/vars/base.yaml" |
13 | 13 | vars: |
14 | 14 | httpd_foreman_backend: "http://localhost:3000" |
15 | | - roles: |
16 | | - - role: pre_install |
17 | | - - role: certificates |
18 | | - - role: postgresql |
19 | | - vars: |
| 15 | + pre_tasks: |
| 16 | + - name: Set development postgresql databases |
| 17 | + ansible.builtin.set_fact: |
20 | 18 | postgresql_databases: |
21 | 19 | - name: "{{ candlepin_database_name }}" |
22 | 20 | owner: "{{ candlepin_database_user }}" |
|
34 | 32 | role_attr_flags: SUPERUSER |
35 | 33 | - name: "{{ pulp_database_user }}" |
36 | 34 | password: "{{ pulp_database_password }}" |
| 35 | + |
| 36 | + - name: Setup iop requirements |
| 37 | + when: |
| 38 | + - "'iop' in enabled_features" |
| 39 | + block: |
| 40 | + - name: Include iop databases |
| 41 | + ansible.builtin.include_vars: |
| 42 | + file: "../../../src/vars/database_iop.yml" |
| 43 | + |
| 44 | + - name: Combine lists |
| 45 | + ansible.builtin.set_fact: |
| 46 | + postgresql_databases: "{{ postgresql_databases + iop_postgresql_databases }}" |
| 47 | + postgresql_users: "{{ postgresql_users + iop_postgresql_users }}" |
| 48 | + |
| 49 | + - name: Enable foreman_rh_cloud plugin for iop |
| 50 | + ansible.builtin.set_fact: |
| 51 | + foreman_development_enabled_plugins: "{{ foreman_development_enabled_plugins + ['foreman_rh_cloud'] }}" |
| 52 | + |
| 53 | + - name: Enable foreman_ansible plugin for iop |
| 54 | + ansible.builtin.set_fact: |
| 55 | + foreman_development_enabled_plugins: "{{ foreman_development_enabled_plugins + ['foreman_ansible'] }}" |
| 56 | + roles: |
| 57 | + - role: pre_install |
| 58 | + - role: certificates |
| 59 | + - role: postgresql |
37 | 60 | - role: redis |
38 | 61 | - role: candlepin |
39 | 62 | - role: httpd |
|
43 | 66 | foreman_development_oauth_consumer_key: "{{ foreman_oauth_consumer_key }}" |
44 | 67 | foreman_development_oauth_consumer_secret: "{{ foreman_oauth_consumer_secret }}" |
45 | 68 | foreman_development_candlepin_oauth_secret: "{{ candlepin_oauth_secret }}" |
| 69 | + - role: iop_core |
| 70 | + when: |
| 71 | + - "'iop' in enabled_features" |
| 72 | + vars: |
| 73 | + iop_core_foreman_oauth_consumer_key: "{{ foreman_oauth_consumer_key }}" |
| 74 | + iop_core_foreman_oauth_consumer_secret: "{{ foreman_oauth_consumer_secret }}" |
46 | 75 | post_tasks: |
| 76 | + - name: Stop Foreman development service |
| 77 | + ansible.builtin.include_role: |
| 78 | + name: foreman_development |
| 79 | + tasks_from: stop-server.yml |
| 80 | + |
47 | 81 | - name: Display development environment information |
48 | 82 | ansible.builtin.debug: |
49 | 83 | msg: | |
|
0 commit comments