Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to specify repository key + location #49

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ marathon_version: "1.3.6"
# Debian: Mesosphere apt repository URL
marathon_apt_package: "marathon={{ marathon_version }}-*"
marathon_apt_repo: "deb http://repos.mesosphere.com/{{ansible_distribution|lower}} {{ansible_distribution_release|lower}} main"
marathon_apt_key_id: 'E56151BF'
marathon_apt_key_server: 'keyserver.ubuntu.com'
# undefined if using key server; if set, will override adding key from key_server above
marathon_apt_key_url:
# Debian apt pin priority for the marathon package. If empty (the default), no pin priority is used.
marathon_apt_pin_priority:

Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ marathon_package_version: "1.0.540"
marathon_os_distribution: "{{ ansible_distribution | lower }}"
marathon_os_version: "{{ ansible_distribution_version.split('.') | join('') }}"
marathon_apt_url: "http://{{ marathon_repo_host }}/{{ ansible_distribution | lower }}"
marathon_apt_key_id: 'E56151BF'
marathon_apt_keyserver: 'keyserver.ubuntu.com'
marathon_apt_key_url:
marathon_package_full_version: "{{ marathon_version }}-{{ marathon_package_version }}.{{ marathon_os_distribution }}{{ marathon_os_version }}"
marathon_apt_package: "marathon={{ marathon_package_full_version }}"

Expand Down
19 changes: 17 additions & 2 deletions tasks/Debian.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
---
- name: Add apt-key
apt_key: id=E56151BF keyserver=keyserver.ubuntu.com state=present
- name: Add apt-key (keyserver)
apt_key:
id: "{{ marathon_apt_key_id }}"
keyserver: "{{ marathon_apt_key_server }}"
state: present
when:
- marathon_apt_key_id and marathon_apt_key_server
- marathon_apt_key_url is not defined

- name: Add apt-key (url)
apt_key:
id: "{{ marathon_apt_key_id }}"
url: "{{ marathon_apt_key_url }}"
state: present
when:
- marathon_apt_key_id and marathon_apt_key_url
- marathon_apt_key_url is defined

- name: Add Mesosphere repo
apt_repository: repo='deb {{ marathon_apt_url }} {{ ansible_distribution_release | lower }} main' state=present update_cache=yes
Expand Down