Skip to content

Commit

Permalink
Merge pull request #85 from madeinoz67/master
Browse files Browse the repository at this point in the history
fixes check-mode failing, adds travis test for check-mode
  • Loading branch information
ernestas-poskus authored Mar 4, 2019
2 parents 517e7c5 + a774cb8 commit 8440756
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ script:
# Ansible syntax check.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/playbook.yml --syntax-check'

# Test role in check mode.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/playbook.yml --check'

# Test role.
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm ansible-playbook /etc/ansible/roles/role_under_test/tests/playbook.yml'

Expand Down
1 change: 1 addition & 0 deletions tasks/install-alert_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
group: "{{ prometheus_group }}"
copy: no
creates: "{{ prometheus_install_dir }}/{{ prometheus_alert_manager_archive }}"
ignore_errors: "{{ansible_check_mode}}"

- name: Copy alert manager config
template:
Expand Down
2 changes: 2 additions & 0 deletions tasks/install-blackbox_exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
group: "{{ prometheus_group }}"
copy: no
creates: "{{ prometheus_install_dir }}/{{ prometheus_blackbox_exporter_archive }}"
ignore_errors: "{{ansible_check_mode}}"

- name: Copy blackbox exporter config
template:
Expand All @@ -34,6 +35,7 @@
path: "{{ prometheus_install_dir }}/{{ prometheus_blackbox_exporter_archive }}/blackbox_exporter"
capability: cap_net_raw+ep
state: present
ignore_errors: "{{ansible_check_mode}}"
notify:
- reload blackboxexporter

Expand Down
1 change: 1 addition & 0 deletions tasks/install-node_exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
group: "{{ prometheus_group }}"
copy: no
creates: "{{ prometheus_install_dir }}/{{ prometheus_node_exporter_archive }}"
ignore_errors: "{{ansible_check_mode}}"

- name: Install Prometheus node exporter systemd service
template:
Expand Down
1 change: 1 addition & 0 deletions tasks/install-prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
group: "{{ prometheus_group }}"
copy: no
creates: "{{ prometheus_install_dir }}/{{ prometheus_archive }}"
ignore_errors: "{{ansible_check_mode}}"

- name: Copy Prometheus config
template:
Expand Down
1 change: 1 addition & 0 deletions tasks/install-push_gateway.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
group: "{{ prometheus_group }}"
copy: no
creates: "{{ prometheus_install_dir }}/{{ prometheus_push_gateway_archive }}"
ignore_errors: "{{ansible_check_mode}}"

- name: Install Prometheus push gateway systemd service
template:
Expand Down
1 change: 1 addition & 0 deletions tasks/install-snmp_exporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
group: "{{ prometheus_group }}"
copy: no
creates: "{{ prometheus_install_dir }}/{{ prometheus_snmp_exporter_archive }}"
ignore_errors: "{{ansible_check_mode}}"

- name: Copy snmp exporter config
copy:
Expand Down

0 comments on commit 8440756

Please sign in to comment.