diff --git a/defaults/main.yml b/defaults/main.yml index 18f3d8a..730971e 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,3 +5,7 @@ ossec_server_name: "" ossec_managed_server: true ossec_server_atomic_release: 1.0-21 ossec_agent_package_name: ossec-hids-agent + +# Set to an empty string or null to disable adding a key +ossec_agent_debian_repository_key: "https://www.atomicorp.com/RPM-GPG-KEY.atomicorp.txt" +ossec_agent_debian_repository_url: "https://updates.atomicorp.com/channels/atomic/{{ ansible_distribution | lower }}" diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 36025c3..673e12f 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,6 +1,10 @@ --- - name: Debian/Ubuntu | Installing repository key - apt_key: url=http://ossec.wazuh.com/repos/apt/conf/ossec-key.gpg.key + apt_key: + url: "{{ ossec_agent_debian_repository_key }}" + when: ossec_agent_debian_repository_key - name: Debian/Ubuntu | Installing repository - apt_repository: repo="deb http://ossec.wazuh.com/repos/apt/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} main" state=present + apt_repository: + repo: "deb {{ ossec_agent_debian_repository_url }} {{ ansible_distribution_release }} main" + state: present