diff --git a/defaults/main.yml b/defaults/main.yml index bcacc6e..f78750d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -23,6 +23,7 @@ verbose: True # Set the package install state for distribution packages # Options are 'present' and 'latest' tacker_package_state: "latest" +tacker_pip_package_state: "latest" tacker_git_repo: https://git.openstack.org/openstack/tacker tacker_git_install_branch: master diff --git a/tasks/main.yml b/tasks/main.yml index 9bc9970..f58cfe5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -30,7 +30,7 @@ - name: Check init system command: cat /proc/1/comm register: _pid1_name - changed_when: false + changed_when: False tags: - always diff --git a/tasks/tacker_db_setup.yml b/tasks/tacker_db_setup.yml index 3e12649..bcc20d6 100644 --- a/tasks/tacker_db_setup.yml +++ b/tasks/tacker_db_setup.yml @@ -13,14 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -# TODO(mbuil): Fix the ansible lint - name: Perform a tacker DB sync command: "{{ tacker_bin }}/tacker-db-manage --config-file {{ tacker_etc_dir }}/tacker.conf upgrade head" become: yes become_user: "{{ tacker_system_user_name }}" + changed_when: False tags: - tacker-db-sync - tacker-setup - tacker-command-bin - - skip_ansible_lint diff --git a/tasks/tacker_init_upstart.yml b/tasks/tacker_init_upstart.yml index 7d6f6de..c6b59e6 100644 --- a/tasks/tacker_init_upstart.yml +++ b/tasks/tacker_init_upstart.yml @@ -26,14 +26,8 @@ notify: - Restart tacker services -# TODO(mbuil): Fix the ansible lint -# probably replace shell by command - name: Reload init scripts - shell: | - initctl reload-configuration + command: initctl reload-configuration when: upstart_init | changed notify: - Restart tacker services - tags: - - skip_ansible_lint - diff --git a/tasks/tacker_install.yml b/tasks/tacker_install.yml index 807bfde..f004df6 100644 --- a/tasks/tacker_install.yml +++ b/tasks/tacker_install.yml @@ -51,12 +51,10 @@ when: - not tacker_developer_mode | bool -# TODO(mbuil): Fix the ansible lint -# Hint: latest should be a var. - name: Install requires pip packages pip: name: "{{ tacker_requires_pip_packages | join(' ') }}" - state: latest + state: "{{ tacker_pip_package_state }}" extra_args: "{{ pip_install_options_fact }}" register: install_packages until: install_packages|success @@ -115,12 +113,10 @@ notify: - Restart tacker services -# TODO(mbuil): Fix the ansible lint -# hint: latest should be a var. - name: Install pip packages pip: name: "{{ tacker_pip_packages | join(' ') }}" - state: latest + state: "{{ tacker_pip_package_state }}" virtualenv: "{{ tacker_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "{{ pip_install_options_fact }}"