diff --git a/defaults/main/install.yml b/defaults/main/install.yml index 34cf1a9..403d614 100644 --- a/defaults/main/install.yml +++ b/defaults/main/install.yml @@ -33,6 +33,9 @@ apt_update_cache: true # flip this flag if you want to install the ondemand-dex RPM install_ondemand_dex: false +# This will default to latest ondemand-dex package if install_ondemand_dex +# is set to true, to control the version installed add the version of the +# package to install (ondemand-dex-2.32.0) ondemand_dex_package: ondemand-dex # needed for testing. no reason to change these in production. diff --git a/tasks/install-package.yml b/tasks/install-package.yml index 0bddbf4..4ea5bda 100644 --- a/tasks/install-package.yml +++ b/tasks/install-package.yml @@ -89,5 +89,5 @@ - name: Install ondemand-dex ansible.builtin.package: name: "{{ ondemand_dex_package }}" - state: latest - when: install_ondemand_dex \ No newline at end of file + state: "{% if ondemand_dex_package == 'ondemand-dex' %}latest{% else %}present{% endif %}" + when: install_ondemand_dex