Fix linting issues for ansible-lint 3.4.1

Preparing this role for the ansible-lint version bump

Change-Id: I63aa87f0b225e7fab576af2b4819b0be6e2184ca
This commit is contained in:
Logan V 2016-11-02 02:31:54 +00:00
parent b141222a47
commit 2ba5dd43c2
9 changed files with 31 additions and 16 deletions

View File

@ -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'
keystone_package_state: "latest"
keystone_pip_package_state: "latest"
# Role standard API override this option in the OS variable files
keystone_shibboleth_repo: {}

View File

@ -13,13 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO(logan): Change to synchronize module to pass ANSIBLE0006
# and remove the skip_ansible_lint tag at that time.
- name: Distribute the credential key repository
shell: |
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-avz \
--delete \
{{ keystone_credential_key_repository }}/ \
command: >
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
-avz
--delete
{{ keystone_credential_key_repository }}/
{{ keystone_system_user_name }}@{{ hostvars[item]['ansible_host'] }}:{{ keystone_credential_key_repository }}/
become: yes
become_user: "{{ keystone_system_user_name }}"
changed_when: false
with_items: "{{ groups['keystone_all'][1:] }}"
tags:
- skip_ansible_lint

View File

@ -15,5 +15,6 @@
- name: Perform a Keystone DB sync
command: "{{ keystone_bin }}/keystone-manage db_sync"
changed_when: false
become: yes
become_user: "{{ keystone_system_user_name }}"

View File

@ -27,9 +27,10 @@
- Restart Shibd
- name: Generate the Shibboleth SP key-pair
shell: "shib-keygen -h {{ external_lb_vip_address }} -y {{ keystone_sp.cert_duration_years }}"
command: "shib-keygen -h {{ external_lb_vip_address }} -y {{ keystone_sp.cert_duration_years }}"
args:
creates: "/etc/shibboleth/sp-cert.pem"
changed_when: false
when: inventory_hostname == groups['keystone_all'][0]
notify:
- Restart service

View File

@ -13,13 +13,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# TODO(logan): Change to synchronize module to pass ANSIBLE0006
# and remove the skip_ansible_lint tag at that time.
- name: Distribute the fernet key repository
shell: |
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' \
-avz \
--delete \
{{ keystone_fernet_tokens_key_repository }}/ \
command: >
rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
-avz
--delete
{{ keystone_fernet_tokens_key_repository }}/
{{ keystone_system_user_name }}@{{ hostvars[item]['ansible_host'] }}:{{ keystone_fernet_tokens_key_repository }}/
become: yes
become_user: "{{ keystone_system_user_name }}"
changed_when: false
with_items: "{{ groups['keystone_all'][1:] }}"
tags:
- skip_ansible_lint

View File

@ -24,8 +24,8 @@
notify: Restart Keystone APIs
- name: Reload init scripts
shell: |
initctl reload-configuration
command: initctl reload-configuration
changed_when: false
when: upstart_init | changed
notify:
- Restart Keystone APIs

View File

@ -45,7 +45,7 @@
- name: Install required pip packages
pip:
name: "{{ keystone_requires_pip_packages | join(' ') }}"
state: latest
state: "{{ keystone_pip_package_state }}"
extra_args: >-
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }}
@ -121,7 +121,7 @@
- name: Install pip packages
pip:
name: "{{ keystone_pip_packages | join(' ') }}"
state: latest
state: "{{ keystone_pip_package_state }}"
virtualenv: "{{ keystone_bin | dirname }}"
virtualenv_site_packages: "no"
extra_args: >-

View File

@ -41,6 +41,7 @@
--bootstrap-internal-url {{ keystone_service_internalurl }}
become: yes
become_user: "{{ keystone_system_user_name }}"
changed_when: false
register: add_service
until: add_service|success
retries: 5

View File

@ -44,6 +44,7 @@
- name: Check init system
command: cat /proc/1/comm
changed_when: false
register: _pid1_name
tags:
- always