From 319e42a5d1b2fcb252dd50bf6f47516bd1b143a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Torma?= Date: Mon, 25 Jul 2022 22:39:47 +0200 Subject: [PATCH] revert debug --- .drone.yml | 8 ++++++++ roles/drone/tasks/main.yaml | 9 ++++++--- roles/matrix/tasks/main.yaml | 3 ++- roles/nexus/tasks/main.yaml | 3 ++- roles/prometheus/tasks/main.yaml | 12 ++++++++---- roles/swagger/tasks/main.yaml | 12 ++++++++---- roles/update/tasks/main.yaml | 9 ++++++--- 7 files changed, 40 insertions(+), 16 deletions(-) diff --git a/.drone.yml b/.drone.yml index 0d9f067..841bf06 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,6 +13,14 @@ steps: - echo "$PWD" - echo "$SSH_KEY" > $PWD/id_rsa && chmod 0600 $PWD/id_rsa +- name: check ansible syntax + image: plugins/ansible:3 + settings: + playbook: nightly.yaml + galaxy: requirements.yaml + inventory: inventory.yaml + syntax_check: true + - name: run playbook in check mode image: plugins/ansible:3 environment: diff --git a/roles/drone/tasks/main.yaml b/roles/drone/tasks/main.yaml index bd8cd34..5a3fa81 100644 --- a/roles/drone/tasks/main.yaml +++ b/roles/drone/tasks/main.yaml @@ -1,13 +1,16 @@ --- -- ansible.builtin.command: docker-compose pull +- name: Update service + ansible.builtin.command: docker-compose pull args: chdir: /home/drone -- ansible.builtin.command: docker-compose down +- name: Shut down service + ansible.builtin.command: docker-compose down args: chdir: /home/drone -- ansible.builtin.command: docker-compose up -d +- name: Start service + ansible.builtin.command: docker-compose up -d args: chdir: /home/drone ... diff --git a/roles/matrix/tasks/main.yaml b/roles/matrix/tasks/main.yaml index 28d3334..b0681fd 100644 --- a/roles/matrix/tasks/main.yaml +++ b/roles/matrix/tasks/main.yaml @@ -1,5 +1,6 @@ --- -- ansible.builtin.copy: +- name: Copy docker-compose configuration + ansible.builtin.copy: src: docker-compose.yaml dest: /home/service-user/docker-compose.yaml owner: service-user diff --git a/roles/nexus/tasks/main.yaml b/roles/nexus/tasks/main.yaml index 28d3334..b0681fd 100644 --- a/roles/nexus/tasks/main.yaml +++ b/roles/nexus/tasks/main.yaml @@ -1,5 +1,6 @@ --- -- ansible.builtin.copy: +- name: Copy docker-compose configuration + ansible.builtin.copy: src: docker-compose.yaml dest: /home/service-user/docker-compose.yaml owner: service-user diff --git a/roles/prometheus/tasks/main.yaml b/roles/prometheus/tasks/main.yaml index f7d7ff3..dbe67df 100644 --- a/roles/prometheus/tasks/main.yaml +++ b/roles/prometheus/tasks/main.yaml @@ -1,26 +1,30 @@ --- -- ansible.builtin.copy: +- name: Copy prometheus configuration + ansible.builtin.copy: src: prometheus.yml dest: /home/service-user/prometheus/prometheus.yml owner: root group: root mode: '0644' -- ansible.builtin.copy: +- name: Copy alertmanager configuration + ansible.builtin.copy: src: alertmanager.yml dest: /home/service-user/alertmanager/config.yml owner: root group: root mode: '0644' -- ansible.builtin.copy: +- name: Copy alert rules + ansible.builtin.copy: src: alert.rules dest: /home/service-user/prometheus/alert.rules owner: root group: root mode: '0644' -- ansible.builtin.copy: +- name: Copy docker-compose configuration + ansible.builtin.copy: src: docker-compose.yaml dest: /home/service-user/docker-compose.yaml owner: service-user diff --git a/roles/swagger/tasks/main.yaml b/roles/swagger/tasks/main.yaml index d2be2e9..e013f03 100644 --- a/roles/swagger/tasks/main.yaml +++ b/roles/swagger/tasks/main.yaml @@ -1,20 +1,24 @@ --- -- ansible.builtin.copy: +- name: Copy docker-compose configuration + ansible.builtin.copy: src: docker-compose.yml dest: /home/swagger/docker-compose.yml owner: swagger group: swagger mode: '0644' -- ansible.builtin.command: docker-compose pull +- name: Update service + ansible.builtin.command: docker-compose pull args: chdir: /home/swagger -- ansible.builtin.command: docker-compose down +- name: Shut down service + ansible.builtin.command: docker-compose down args: chdir: /home/swagger -- ansible.builtin.command: docker-compose up -d +- name: Start service + ansible.builtin.command: docker-compose up -d args: chdir: /home/swagger ... diff --git a/roles/update/tasks/main.yaml b/roles/update/tasks/main.yaml index 9356058..ae1499d 100644 --- a/roles/update/tasks/main.yaml +++ b/roles/update/tasks/main.yaml @@ -1,13 +1,16 @@ --- -- ansible.builtin.command: docker-compose pull +- name: Update service + ansible.builtin.command: docker-compose pull args: chdir: /home/service-user -- ansible.builtin.command: docker-compose down +- name: Shut down service + ansible.builtin.command: docker-compose down args: chdir: /home/service-user -- ansible.builtin.command: docker-compose up -d +- name: Start service + ansible.builtin.command: docker-compose up -d args: chdir: /home/service-user ...