Skip to content

Commit

Permalink
Fix check if agent is already installed
Browse files Browse the repository at this point in the history
  • Loading branch information
centic9 committed Oct 21, 2017
1 parent d9cd13d commit 824d826
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: Check that the somefile.conf exists
- name: Check if Dynatrace OneAgent is already installed
stat:
path: /opt/dynatrace/oneagent/agent/lib64/liboneagentos.so
register: agent_installed
Expand Down Expand Up @@ -36,9 +36,9 @@
get_url:
url: "{{ oneagent_installer_script_url }}"
dest: "/tmp/dynatrace-oneagent.sh"
when: agent_installed == False and (oneagent_installer_script_url is defined) and (oneagent_installer_script_url is not none)
when: agent_installed.stat.exists == False and (oneagent_installer_script_url is defined) and (oneagent_installer_script_url is not none)

- name: "Install Dynatrace OneAgent"
shell: "sh /tmp/dynatrace-oneagent.sh"
become: yes
when: ansible_architecture != "armv7l" and agent_installed == False
when: ansible_architecture != "armv7l" and agent_installed.stat.exists == False

0 comments on commit 824d826

Please sign in to comment.