Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
unhold shouldn't generate change
Browse files Browse the repository at this point in the history
This is require to fix idempotence test.
  • Loading branch information
jmlrt committed May 25, 2021
1 parent 3b4dfe7 commit 97b056c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tasks/beats-debian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

- name: Debian - Ensure apt-transport-https is installed
become: yes
apt:
Expand Down Expand Up @@ -40,7 +39,7 @@
- name: Debian - Add Beats repository key
become: yes
apt_key:
url: '{{ elastic_repo_key }}'
url: "{{ elastic_repo_key }}"
state: present
register: apt_key_install
until: apt_key_install is succeeded
Expand All @@ -49,7 +48,7 @@
- name: Debian - add beats repository
become: yes
apt_repository:
repo: 'deb {{ repo_url }} stable main'
repo: "deb {{ repo_url }} stable main"
state: present
register: repo_install
until: repo_install is succeeded
Expand All @@ -65,6 +64,7 @@
name: "{{ beat }}"
selection: "install"
when: beat in ansible_facts.packages
changed_when: false

- name: Debian - Ensure {{ beat }} is installed
become: yes
Expand Down Expand Up @@ -96,13 +96,13 @@
url: >-
{% if custom_package_url is defined %}{{ custom_package_url }}{%
else %}{{ beats_package_url }}/{{ beat }}/{{ beat }}_{{ beats_version }}_{{ os_arch }}.deb{% endif %}
dest: '/tmp/{{ beat }}_{{ beats_version }}_{{ os_arch }}.deb'
dest: "/tmp/{{ beat }}_{{ beats_version }}_{{ os_arch }}.deb"
validate_certs: false
when: not use_repository | bool

- name: Debian - Ensure {{ beat }} is installed from downloaded package
become: yes
apt:
deb: '/tmp/{{ beat }}_{{ beats_version }}_{{ os_arch }}.deb'
deb: "/tmp/{{ beat }}_{{ beats_version }}_{{ os_arch }}.deb"
when: not use_repository | bool
notify: restart the service

0 comments on commit 97b056c

Please sign in to comment.