diff --git a/defaults/main.yml b/defaults/main.yml index 0c25a377..e7d8579d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -13,9 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Set the package install state for distribution packages +# Set the package install state for distribution and pip packages # Options are 'present' and 'latest' cinder_package_state: "latest" +cinder_pip_package_state: "latest" cinder_git_repo: https://git.openstack.org/openstack/cinder cinder_git_install_branch: master diff --git a/handlers/main.yml b/handlers/main.yml index 987fc0b5..eb99137c 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -19,8 +19,8 @@ - Restart cinder services - name: Reload upstart init scripts - shell: | - initctl reload-configuration + command: initctl reload-configuration + changed_when: false notify: - Restart cinder services diff --git a/tasks/cinder_backends.yml b/tasks/cinder_backends.yml index e75b0370..c9a5e961 100644 --- a/tasks/cinder_backends.yml +++ b/tasks/cinder_backends.yml @@ -30,6 +30,7 @@ {{ cinder_bin }}/cinder {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }} type-key "{{ item.key }}" set volume_backend_name="{{ item.value.volume_backend_name }}" fi with_dict: "{{ cinder_backends|default({}) }}" + changed_when: false - name: Add extra cinder volume types shell: | diff --git a/tasks/cinder_db_setup.yml b/tasks/cinder_db_setup.yml index bea6495a..0ff6c669 100644 --- a/tasks/cinder_db_setup.yml +++ b/tasks/cinder_db_setup.yml @@ -17,3 +17,4 @@ command: "{{ cinder_bin }}/cinder-manage db sync" become: yes become_user: "{{ cinder_system_user_name }}" + changed_when: false diff --git a/tasks/cinder_install.yml b/tasks/cinder_install.yml index 4ec68552..1d04da1a 100644 --- a/tasks/cinder_install.yml +++ b/tasks/cinder_install.yml @@ -54,7 +54,7 @@ - name: Install requires pip packages pip: name: "{{ cinder_requires_pip_packages | join(' ') }}" - state: latest + state: "{{ cinder_pip_package_state }}" extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success @@ -127,7 +127,7 @@ - name: Install pip packages pip: name: "{{ cinder_pip_packages | join(' ') }}" - state: latest + state: "{{ cinder_pip_package_state }}" virtualenv: "{{ cinder_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "{{ pip_install_options_fact }}" diff --git a/tasks/cinder_qos.yml b/tasks/cinder_qos.yml index d0157622..2d3d31d0 100644 --- a/tasks/cinder_qos.yml +++ b/tasks/cinder_qos.yml @@ -19,7 +19,8 @@ {{ cinder_bin }}/cinder qos-list | grep {{ item.name }} || \ {{ cinder_bin }}/cinder qos-create {{ item.name }}\ {% for k,v in item.options.iteritems() %} {{ k }}={{ v }}{% endfor %} - with_items: cinder_qos_specs + with_items: "{{ cinder_qos_specs }}" + changed_when: false tags: - cinder-qos @@ -31,7 +32,7 @@ $({{ cinder_bin }}/cinder qos-list | grep {{ item.name }} | grep -oE "{{ _UUID_regex }}") \ $({{ cinder_bin }}/cinder type-list | grep {{ vtype }} | grep -oE "{{ _UUID_regex }}") {% endfor %} - with_items: cinder_qos_specs + with_items: "{{ cinder_qos_specs }}" when: - item.cinder_volume_types is defined tags: diff --git a/tasks/main.yml b/tasks/main.yml index a7c63d26..c2079fc9 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,6 +27,7 @@ - name: Check init system command: cat /proc/1/comm + changed_when: false register: _pid1_name tags: - always