diff --git a/build/ansible/roles/initialization/tasks/main.yml b/build/ansible/roles/initialization/tasks/main.yml index f66efd862a..35772bd0fb 100644 --- a/build/ansible/roles/initialization/tasks/main.yml +++ b/build/ansible/roles/initialization/tasks/main.yml @@ -101,20 +101,22 @@ method: GET retries: 20 delay: 5 + register: pmm_ready + until: pmm_ready.status == 200 ignore_errors: true - name: Initialize admin password for AMI if needed include_role: name: init-admin-password-ami when: need_initialization and is_ami + when: need_initialization or need_upgrade - - name: Disable maintenance mode - file: - state: absent - path: /usr/share/pmm-server/maintenance/maintenance.html +- name: Disable maintenance mode + file: + state: absent + path: /usr/share/pmm-server/maintenance/maintenance.html - - name: Remove the file provisioned by 'getStatus' - file: - state: absent - path: /srv/pmm-update.json - when: need_initialization or need_upgrade +- name: Remove the file provisioned by 'getStatus' + file: + state: absent + path: /srv/pmm-update.json diff --git a/build/packer/ansible/roles/podman-setup/tasks/main.yml b/build/packer/ansible/roles/podman-setup/tasks/main.yml index b7e9bf21fe..b5cab0bc41 100644 --- a/build/packer/ansible/roles/podman-setup/tasks/main.yml +++ b/build/packer/ansible/roles/podman-setup/tasks/main.yml @@ -24,6 +24,13 @@ policy: targeted state: permissive +- name: Update podman.conf + lineinfile: + path: /usr/lib/tmpfiles.d/podman.conf + regexp: '^x /tmp/storage-run-\*' + line: 'R! /tmp/storage-run-*' + backrefs: yes + - name: Create a volume on the host command: podman volume create pmm-data become: true diff --git a/build/packer/ansible/roles/podman-setup/templates/pmm-server.env b/build/packer/ansible/roles/podman-setup/templates/pmm-server.env index 1ffca72c01..4290850d2a 100644 --- a/build/packer/ansible/roles/podman-setup/templates/pmm-server.env +++ b/build/packer/ansible/roles/podman-setup/templates/pmm-server.env @@ -1,5 +1,4 @@ PMM_WATCHTOWER_HOST=http://watchtower:8080 PMM_WATCHTOWER_TOKEN=123 -PMM_DEV_UPDATE_DOCKER_IMAGE=docker.io/perconalab/pmm-server:3-dev-container PMM_IMAGE={{ pmm_server_image_name }} PMM_DISTRIBUTION_METHOD={{ pmm_distribution_method }}