diff --git a/README.md b/README.md index 29a5375..749efe8 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Role Variables ```yaml --- ansible_playbook_version: 0.1 -zookeeper_playbook_version: "0.9.2" +zookeeper_playbook_version: "0.17.0" zookeeper_version: 3.4.6 zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz @@ -39,6 +39,12 @@ zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_ver # Note: by default Ubuntu 15.04 and later use systemd (but support switch to upstart) zookeeper_debian_systemd_enabled: "{{ ansible_distribution_version|version_compare(15.04, '>=') }}" zookeeper_debian_apt_install: false +# (Optional:) add custom 'ppa' repositories depending on the distro version (only with debian_apt_install=true) +# Example: to use a community zookeeper v3.4.8 deb pkg for Ubuntu 14.04 (where latest official is v3.4.5) +zookeeper_debian_apt_repositories: + - repository_url: "ppa:ufscar/zookeeper" + distro_version: "14.04" + apt_cache_timeout: 3600 zookeeper_register_path_env: false diff --git a/defaults/main.yml b/defaults/main.yml index 7675470..fd691b6 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,6 +1,6 @@ --- ansible_playbook_version: 0.1 -zookeeper_playbook_version: "0.9.2" +zookeeper_playbook_version: "0.17.0" zookeeper_version: 3.4.6 zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz @@ -8,6 +8,7 @@ zookeeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_ver # Note: by default Ubuntu 15.04 and later use systemd (but support switch to upstart) zookeeper_debian_systemd_enabled: "{{ ansible_distribution_version|version_compare(15.04, '>=') }}" zookeeper_debian_apt_install: false +zookeeper_debian_apt_repositories: [] apt_cache_timeout: 3600 zookeeper_register_path_env: false diff --git a/tasks/Debian.yml b/tasks/Debian.yml index e33536f..b4e4090 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,4 +1,10 @@ --- +- name: Add optional custom apt repositories (for additional zookeeper versions) + apt_repository: repo={{item.repository_url}} state=present + when: "{{ ansible_distribution_version|version_compare(item.distro_version, item.version_comparator|default('=')) }}" + with_items: + - "{{ zookeeper_debian_apt_repositories }}" + - name: Update apt cache apt: update_cache=yes cache_valid_time={{apt_cache_timeout}} tags: bootstrap