Fix linting issues for ansible-lint 3.4.1
Preparing this role for the ansible-lint version bump Change-Id: I6a6e84d5105980e766048e27780c397724627572
This commit is contained in:
parent
cf909ad907
commit
7eec52c0bb
@ -18,9 +18,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'
|
||||
ironic_package_state: "latest"
|
||||
ironic_pip_package_state: "latest"
|
||||
|
||||
# These variables are used in 'developer mode' in order to allow the role
|
||||
# to build an environment directly from a git source without the presence
|
||||
|
@ -49,6 +49,7 @@
|
||||
## which is a wasted effort.
|
||||
- name: Copy syslinux pxlinux.0
|
||||
command: "cp {{ ironic_pxelinux_path }} /tftpboot/pxelinux.0"
|
||||
changed_when: false
|
||||
|
||||
## TODO(odyssey4me): Switch this to the copy module and make use of
|
||||
## remote_src: True once we move to Ansible 2.x. For Ansible 1.9x
|
||||
@ -56,3 +57,4 @@
|
||||
## which is a wasted effort.
|
||||
- name: Copy syslinux chain.c32
|
||||
command: "cp {{ ironic_chainc32_path }} /tftpboot/chain.c32"
|
||||
changed_when: false
|
||||
|
@ -17,5 +17,6 @@
|
||||
command: "{{ ironic_bin }}/ironic-dbsync upgrade"
|
||||
become: yes
|
||||
become_user: "{{ ironic_system_user_name }}"
|
||||
changed_when: false
|
||||
notify:
|
||||
- Restart ironic services
|
||||
|
@ -25,8 +25,7 @@
|
||||
- Restart ironic services
|
||||
|
||||
- name: Reload init scripts
|
||||
shell: |
|
||||
initctl reload-configuration
|
||||
command: initctl reload-configuration
|
||||
when: upstart_init | changed
|
||||
notify:
|
||||
- Restart ironic services
|
||||
|
@ -56,7 +56,7 @@
|
||||
- name: Install requires pip packages
|
||||
pip:
|
||||
name: "{{ ironic_requires_pip_packages | join(' ') }}"
|
||||
state: latest
|
||||
state: "{{ ironic_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: "{{ ironic_pip_packages | join(' ') }}"
|
||||
state: latest
|
||||
state: "{{ ironic_pip_package_state }}"
|
||||
virtualenv: "{{ ironic_bin | dirname }}"
|
||||
virtualenv_site_packages: "no"
|
||||
extra_args: "{{ pip_install_options_fact }}"
|
||||
|
@ -38,14 +38,15 @@
|
||||
- always
|
||||
|
||||
- name: Post swift tempURL secret key
|
||||
shell: |
|
||||
OS_ENDPOINT_TYPE=internalURL \
|
||||
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }} \
|
||||
--os-username "service:{{ glance_service_user_name }}" \
|
||||
--os-password {{ glance_service_password }} \
|
||||
--os-auth-url {{ keystone_service_internalurl }} \
|
||||
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }} \
|
||||
command: >
|
||||
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
|
||||
--os-username "service:{{ glance_service_user_name }}"
|
||||
--os-password {{ glance_service_password }}
|
||||
--os-auth-url {{ keystone_service_internalurl }}
|
||||
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
|
||||
post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }}
|
||||
environment:
|
||||
OS_ENDPOINT_TYPE: internalURL
|
||||
when:
|
||||
- inventory_hostname == groups['ironic_all'][0]
|
||||
- not ironic_standalone | bool
|
||||
@ -53,14 +54,15 @@
|
||||
- always
|
||||
|
||||
- name: Get swift account
|
||||
shell: |
|
||||
OS_ENDPOINT_TYPE=internalURL \
|
||||
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }} \
|
||||
--os-username "service:{{ glance_service_user_name }}" \
|
||||
--os-password {{ glance_service_password }} \
|
||||
--os-auth-url {{ keystone_service_internalurl }} \
|
||||
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }} \
|
||||
shell: >
|
||||
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
|
||||
--os-username "service:{{ glance_service_user_name }}"
|
||||
--os-password {{ glance_service_password }}
|
||||
--os-auth-url {{ keystone_service_internalurl }}
|
||||
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
|
||||
stat -v | awk '/StorageURL\:/ {print $2}'
|
||||
environment:
|
||||
OS_ENDPOINT_TYPE: internalURL
|
||||
register: swift_storage_url
|
||||
when:
|
||||
- (ironic_swift_auth_account is undefined) or (ironic_swift_endpoint is undefined)
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
- name: Check init system
|
||||
command: cat /proc/1/comm
|
||||
changed_when: false
|
||||
register: _pid1_name
|
||||
tags:
|
||||
- always
|
||||
|
Loading…
Reference in New Issue
Block a user