Aded a register so installation can be done again. This would also reduce the amount of E405 lint errors

This commit is contained in:
Werner Dijkerman
2019-01-23 09:58:00 +01:00
parent 0b285f7772
commit bf008bec0c
3 changed files with 10 additions and 0 deletions

View File

@ -15,6 +15,8 @@
apt: apt:
name: "apt-transport-https" name: "apt-transport-https"
state: present state: present
register: are_telegraf_dependencies_packages_installed
until: are_telegraf_dependencies_packages_installed is succeeded
when: when:
- not apt_https_transport.stat.exists - not apt_https_transport.stat.exists
become: yes become: yes
@ -51,5 +53,7 @@
state: "{{ telegraf_agent_package_state }}" state: "{{ telegraf_agent_package_state }}"
cache_valid_time: 900 cache_valid_time: 900
force: True force: True
register: is_telegraf_package_installed
until: is_telegraf_package_installed is succeeded
notify: "Restart Telegraf" notify: "Restart Telegraf"
become: yes become: yes

View File

@ -24,4 +24,6 @@
package: package:
name: "{{ telegraf_agent_package }}" name: "{{ telegraf_agent_package }}"
state: "{{ telegraf_agent_package_state }}" state: "{{ telegraf_agent_package_state }}"
register: is_telegraf_package_installed
until: is_telegraf_package_installed is succeeded
notify: "Restart Telegraf" notify: "Restart Telegraf"

View File

@ -17,6 +17,8 @@
name: ["python-libxml2", "python-xml"] name: ["python-libxml2", "python-xml"]
update_cache: True update_cache: True
state: present state: present
register: are_telegraf_dependencies_packages_installed
until: are_telegraf_dependencies_packages_installed is succeeded
become: yes become: yes
- name: "Suse | Install basic repo file" - name: "Suse | Install basic repo file"
@ -32,6 +34,8 @@
zypper: zypper:
name: "{{ telegraf_agent_package }}" name: "{{ telegraf_agent_package }}"
state: "{{ telegraf_agent_package_state }}" state: "{{ telegraf_agent_package_state }}"
register: is_telegraf_package_installed
until: is_telegraf_package_installed is succeeded
become: yes become: yes
- name: "Suse | Create directories for telegraf" - name: "Suse | Create directories for telegraf"