Skip to content

Commit

Permalink
test - increase test-monitoring delay and replace type by builtin.stat
Browse files Browse the repository at this point in the history
Change-Id: Ib8970fd5d6588442b31018825dc69c21476d78a3
  • Loading branch information
morucci committed Nov 28, 2023
1 parent e73b1f2 commit 9371484
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions roles/health-check/test-monitoring/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
register: zeo
until: zeo.stdout != "" and "null" not in zeo.stdout
retries: 60
delay: 2
delay: 4

# config-update-nodepool-builder should at least trigger one tick for readiness.
- name: Fetch a basic Nodepool metric exported by statsd
ansible.builtin.shell: curl -k https://{{ prometheus_host }}/api/v1/query?query=nodepool_launch_ready | jq '.data.result[0].value[1]'
register: nlr
until: nlr.stdout != "" and "null" not in nlr.stdout
retries: 60
delay: 2
delay: 4

# Use a dictionary to trick Ansible into casting metrics to int/float
- set_fact:
Expand Down
34 changes: 17 additions & 17 deletions roles/setup-log-forwarding/tasks/install-logCLI.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
- name: check if logCLI is present
ansible.builtin.shell: type logcli
register: logcli_exists
ignore_errors: true
ansible.builtin.stat:
path: "~/bin/logcli"
register: logcli_stat

- name: Install logCLI
block:
- name: download and unzip logCLI
ansible.builtin.unarchive:
src: "https://github.com/grafana/loki/releases/download/v2.9.2/logcli-linux-amd64.zip"
remote_src: yes
mode: a+x
dest: /tmp/
- name: download and unzip logCLI
ansible.builtin.unarchive:
src: "https://github.com/grafana/loki/releases/download/v2.9.2/logcli-linux-amd64.zip"
remote_src: yes
mode: a+x
dest: /tmp/

- name: ensure ~/bin exists
ansible.builtin.file:
path: ~/bin
state: directory
mode: '0755'
- name: ensure ~/bin exists
ansible.builtin.file:
path: ~/bin
state: directory
mode: "0755"

- name: move logCLI to ~/bin/
command: mv /tmp/logcli-linux-amd64 ~/bin/logcli
when: logcli_exists.rc > 0
- name: move logCLI to ~/bin/
command: mv /tmp/logcli-linux-amd64 ~/bin/logcli
when: not logcli_stat.stat.exists

0 comments on commit 9371484

Please sign in to comment.