Fix sources conditionals in Debian.yml tasks

This commit is contained in:
Jose M 2019-11-25 15:44:24 +01:00
parent 66ac8fea81
commit ce3dcf7abe

View File

@ -20,13 +20,14 @@
when: when:
- ansible_distribution == "Ubuntu" - ansible_distribution == "Ubuntu"
- ansible_distribution_major_version | int == 14 - ansible_distribution_major_version | int == 14
- not wazuh_manager_sources_installation.enabled - not wazuh_agent_sources_installation.enabled
- name: Debian/Ubuntu | Installing Wazuh repository key - name: Debian/Ubuntu | Installing Wazuh repository key
apt_key: apt_key:
url: "{{ wazuh_agent_config.repo.gpg }}" url: "{{ wazuh_agent_config.repo.gpg }}"
when: when:
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14) - not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version | int == 14)
- not wazuh_agent_sources_installation.enabled
- name: Debian/Ubuntu | Add Wazuh repositories - name: Debian/Ubuntu | Add Wazuh repositories
apt_repository: apt_repository:
@ -35,7 +36,7 @@
state: present state: present
update_cache: true update_cache: true
when: when:
- not wazuh_manager_sources_installation.enabled - not wazuh_agent_sources_installation.enabled
- name: Debian/Ubuntu | Set Distribution CIS filename for debian - name: Debian/Ubuntu | Set Distribution CIS filename for debian
set_fact: set_fact: