X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=ocd%2Finfra%2Fplaybooks%2Froles%2Feg_mecm-mepm%2Ftasks%2Finstall.yml;h=12a388c1b7f6744a84acb0754506555a3fd086d0;hb=refs%2Fchanges%2F95%2F3895%2F5;hp=42a72bbfeea73084f39923c16a3b5be8f5e5ce1b;hpb=4274bc1e41bb0568bf72914248cf0a24b1f59f11;p=ealt-edge.git diff --git a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/install.yml b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/install.yml index 42a72bb..12a388c 100644 --- a/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/install.yml +++ b/ocd/infra/playbooks/roles/eg_mecm-mepm/tasks/install.yml @@ -26,11 +26,15 @@ file: ../../../config.yml name: vardata +- name: Set a variable + ansible.builtin.set_fact: + comm_pwd: "{{ vardata.common_pwd.name }}" + - name: Replacing password replace: path: /tmp/eg_mecm-mepm/deploy/conf/keys/postgres_init.sql regexp: 'PASSWORD_VALUE' - replace: "{{ vardata.db_password.name }}" + replace: "{{ vardata.common_pwd.name }}" - name: Create mecm-mepm-ssl-secret secret # yamllint disable rule:line-length @@ -48,15 +52,15 @@ - name: Create edgegallery-mepm-secret secret with common pwd # yamllint disable rule:line-length - command: kubectl create secret generic edgegallery-mepm-secret --from-file=postgres_init.sql=/tmp/eg_mecm-mepm/deploy/conf/keys/postgres_init.sql --from-literal=postgresPassword={{ vardata.db_password.name}} --from-literal=postgresLcmCntlrPassword={{ vardata.db_password.name}} --from-literal=postgresk8sPluginPassword={{ vardata.db_password.name}} + command: kubectl create secret generic edgegallery-mepm-secret --from-file=postgres_init.sql=/tmp/eg_mecm-mepm/deploy/conf/keys/postgres_init.sql --from-literal=postgresPassword={{ vardata.common_pwd.name}} --from-literal=postgresLcmCntlrPassword={{ vardata.common_pwd.name}} --from-literal=postgresk8sPluginPassword={{ vardata.common_pwd.name}} # yamllint disable rule:line-length - when: '{{ vardata.db_password.name}}' + when: comm_pwd != "" - name: Create edgegallery-mepm-secret secret # yamllint disable rule:line-length command: kubectl create secret generic edgegallery-mepm-secret --from-file=postgres_init.sql=/tmp/eg_mecm-mepm/deploy/conf/keys/postgres_init.sql --from-literal=postgresPassword={{ vardata.mecm_mepm_postgresPassword.name}} --from-literal=postgresLcmCntlrPassword={{ vardata.mecm_mepm_postgresLcmCntlrPassword.name}} --from-literal=postgresk8sPluginPassword={{ vardata.mecm_mepm_postgresk8sPluginPassword.name}} # yamllint disable rule:line-length - when: '{{ vardata.mecm_mepm_postgresPassword.name}}' + when: comm_pwd == "" - name: Create mepm service account command: kubectl apply -f /tmp/eg_mecm-mepm/deploy/conf/manifest/mepm/mepm-service-account.yaml