diff --git a/defaults/main.yml b/defaults/main.yml index afd99d5a..1291301a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -16,9 +16,10 @@ ## Verbosity Options debug: False -# Set the package install state for distribution packages +# Set the package install state for distribution and pip packages # Options are 'present' and 'latest' horizon_package_state: "latest" +horizon_pip_package_state: "latest" ## Toggle developer mode horizon_developer_mode: false diff --git a/tasks/horizon_db_setup.yml b/tasks/horizon_db_setup.yml index 388b9a7c..a46c708e 100644 --- a/tasks/horizon_db_setup.yml +++ b/tasks/horizon_db_setup.yml @@ -17,6 +17,7 @@ command: "{{ horizon_bin }}/horizon-manage.py syncdb --noinput" become: yes become_user: "{{ horizon_system_user_name }}" + changed_when: false - name: Register DB session cleanup cron cron: diff --git a/tasks/horizon_install.yml b/tasks/horizon_install.yml index ab2cf26c..7ff470a6 100644 --- a/tasks/horizon_install.yml +++ b/tasks/horizon_install.yml @@ -53,7 +53,7 @@ - name: Install requires pip packages pip: name: "{{ horizon_requires_pip_packages | join(' ') }}" - state: latest + state: "{{ horizon_pip_package_state }}" extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success @@ -126,7 +126,7 @@ - name: Install pip packages pip: name: "{{ horizon_pip_packages | join(' ') }}" - state: latest + state: "{{ horizon_pip_package_state }}" virtualenv: "{{ horizon_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "{{ pip_install_options_fact }}" diff --git a/tasks/horizon_post_install.yml b/tasks/horizon_post_install.yml index dc691cb2..a89e6358 100644 --- a/tasks/horizon_post_install.yml +++ b/tasks/horizon_post_install.yml @@ -145,6 +145,7 @@ command: "{{ horizon_bin }}/horizon-manage.py compilemessages" args: chdir: "{{ horizon_lib_dir }}/{{ item }}" + changed_when: false with_items: - horizon - openstack_dashboard @@ -155,6 +156,7 @@ command: "{{ item }}" become: yes become_user: "{{ horizon_system_user_name }}" + changed_when: false with_items: - "{{ horizon_bin }}/horizon-manage.py collectstatic --noinput" - "{{ horizon_bin }}/horizon-manage.py compress --force"