From cf56eca98d538b267a8170210c44f345590fa275 Mon Sep 17 00:00:00 2001 From: Logan V Date: Wed, 2 Nov 2016 12:38:16 +0000 Subject: [PATCH] Fix linting issues for ansible-lint 3.4.1 Preparing this role for the ansible-lint version bump Change-Id: I4d6689aae6a1192b595bc2f40da6d8c039373a08 --- defaults/main.yml | 3 ++- tasks/calico_config.yml | 2 +- tasks/main.yml | 3 ++- tasks/neutron_init_upstart.yml | 3 +-- tasks/neutron_install.yml | 4 ++-- tasks/nuage_neutron_config.yml | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 6c527e07..49a62e95 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' neutron_package_state: "latest" +neutron_pip_package_state: "latest" neutron_git_repo: https://git.openstack.org/openstack/neutron neutron_git_install_branch: master diff --git a/tasks/calico_config.yml b/tasks/calico_config.yml index 6b2d91e2..4e38013e 100644 --- a/tasks/calico_config.yml +++ b/tasks/calico_config.yml @@ -16,7 +16,7 @@ - name: Install Calico pip packages pip: name: "{{ item }}" - state: latest + state: "{{ neutron_pip_package_state }}" virtualenv: "{{ neutron_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "{{ pip_install_options_fact }}" diff --git a/tasks/main.yml b/tasks/main.yml index 4675fbc6..78eb6a9f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,6 +26,7 @@ - name: Check init system command: cat /proc/1/comm + changed_when: false register: _pid1_name tags: - always @@ -37,7 +38,7 @@ - always - name: Get CPU info content and store as var - shell: cat /proc/cpuinfo + command: cat /proc/cpuinfo register: cpuinfo_contents changed_when: false failed_when: false diff --git a/tasks/neutron_init_upstart.yml b/tasks/neutron_init_upstart.yml index e7d7f1fd..f6f4669b 100644 --- a/tasks/neutron_init_upstart.yml +++ b/tasks/neutron_init_upstart.yml @@ -23,6 +23,5 @@ register: upstart_init - name: Reload init scripts - shell: | - initctl reload-configuration + command: initctl reload-configuration when: upstart_init | changed diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index 4bab84a4..051e0e44 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -54,7 +54,7 @@ - name: Install requires pip packages pip: name: "{{ neutron_requires_pip_packages | join(' ') }}" - state: latest + state: "{{ neutron_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: "{{ neutron_pip_packages | join(' ') }}" - state: latest + state: "{{ neutron_pip_package_state }}" virtualenv: "{{ neutron_bin | dirname }}" virtualenv_site_packages: "no" extra_args: "{{ pip_install_options_fact }}" diff --git a/tasks/nuage_neutron_config.yml b/tasks/nuage_neutron_config.yml index 0a072cee..b74cfb10 100644 --- a/tasks/nuage_neutron_config.yml +++ b/tasks/nuage_neutron_config.yml @@ -15,7 +15,7 @@ - name: Install nuage neutron pip packages pip: name: "{{ neutron_proprietary_nuage_pip_packages | join(' ') }}" - state: latest + state: "{{ neutron_pip_package_state }}" virtualenv: "{{ neutron_bin | dirname }}" virtualenv_site_packages: "no" retries: 5