Commit 1b898ece authored by Mudassar Khan's avatar Mudassar Khan
Browse files

fix config order in playbooks

parent 1ad25bf0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -103,13 +103,13 @@
- name: "Update ingress host in .meepctl-repocfg.yaml"
  replace:
    path: "{{ mec_frontend_dir }}/config/.meepctl-repocfg.yaml"
    regexp: 'host:\s*try-mec\.etsi\.org'
    regexp: 'host:\s*mec-platform\.etsi\.org'
    replace: "host: {{ mec_host_address }}"

- name: "Update GitHub redirect-uri in .meepctl-repocfg.yaml"
  replace:
    path: "{{ mec_frontend_dir }}/config/.meepctl-repocfg.yaml"
    regexp: 'redirect-uri:\s*https://try-mec\.etsi\.org/platform-ctrl/v1/authorize'
    regexp: 'redirect-uri:\s*https://mec-platform\.etsi\.org/platform-ctrl/v1/authorize'
    replace: "redirect-uri: https://{{ mec_host_address }}/platform-ctrl/v1/authorize"

- name: "Config complete"
+30 −30
Original line number Diff line number Diff line
@@ -42,73 +42,73 @@
  debug:
    msg: "meepctl installed: {{ meepctl_version.stdout }}"

# --- Build & Deploy Frontend ---
# --- Configure meepctl ---

- name: Build frontend
  shell: |
    cd {{ mec_frontend_dir }}
    bash build.sh
- name: "meepctl config ip"
  shell: "meepctl config ip {{ mec_host_address }}"
  args:
    executable: /bin/bash
  become: true
  become_user: "{{ target_user }}"
  environment:
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:{{ target_home }}/.nvm/versions/node/v{{ node_version }}/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    HOME: "{{ target_home }}"
  register: frontend_build
  register: config_ip

- name: Show frontend build output
- name: Show meepctl config ip output
  debug:
    msg: "{{ frontend_build.stdout_lines | default([]) }}"
    msg: "{{ config_ip.stdout_lines | default([]) }}"

- name: Deploy frontend
  shell: |
    cd {{ mec_frontend_dir }}
    bash deploy.sh
- name: "meepctl config gitdir"
  shell: "meepctl config gitdir {{ mec_sandbox_dir }}"
  args:
    executable: /bin/bash
  become: true
  become_user: "{{ target_user }}"
  environment:
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:{{ target_home }}/.nvm/versions/node/v{{ node_version }}/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    HOME: "{{ target_home }}"
  register: frontend_deploy
  register: config_gitdir

- name: Show frontend deploy output
- name: Show meepctl config gitdir output
  debug:
    msg: "{{ frontend_deploy.stdout_lines | default([]) }}"
    msg: "{{ config_gitdir.stdout_lines | default([]) }}"

# --- Configure meepctl ---
# --- Build & Deploy Frontend ---

- name: "meepctl config ip"
  shell: "meepctl config ip {{ mec_host_address }}"
- name: Build frontend
  shell: |
    cd {{ mec_frontend_dir }}
    bash build.sh
  args:
    executable: /bin/bash
  become: true
  become_user: "{{ target_user }}"
  environment:
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:{{ target_home }}/.nvm/versions/node/v{{ node_version }}/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    HOME: "{{ target_home }}"
  register: config_ip
  register: frontend_build

- name: Show meepctl config ip output
- name: Show frontend build output
  debug:
    msg: "{{ config_ip.stdout_lines | default([]) }}"
    msg: "{{ frontend_build.stdout_lines | default([]) }}"

- name: "meepctl config gitdir"
  shell: "meepctl config gitdir {{ mec_sandbox_dir }}"
- name: Deploy frontend
  shell: |
    cd {{ mec_frontend_dir }}
    bash deploy.sh
  args:
    executable: /bin/bash
  become: true
  become_user: "{{ target_user }}"
  environment:
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    PATH: "/usr/local/go/bin:{{ target_home }}/gocode/bin:{{ target_home }}/.nvm/versions/node/v{{ node_version }}/bin:/snap/bin:/usr/local/bin:/usr/bin:/bin"
    HOME: "{{ target_home }}"
  register: config_gitdir
  register: frontend_deploy

- name: Show meepctl config gitdir output
- name: Show frontend deploy output
  debug:
    msg: "{{ config_gitdir.stdout_lines | default([]) }}"
    msg: "{{ frontend_deploy.stdout_lines | default([]) }}"

# --- Configure secrets ---