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:
Logan V 2016-11-02 12:28:20 +00:00
parent cf909ad907
commit 7eec52c0bb
7 changed files with 25 additions and 19 deletions

View File

@ -18,9 +18,10 @@
# Verbosity Options # Verbosity Options
debug: False 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' # Options are 'present' and 'latest'
ironic_package_state: "latest" ironic_package_state: "latest"
ironic_pip_package_state: "latest"
# These variables are used in 'developer mode' in order to allow the role # 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 # to build an environment directly from a git source without the presence

View File

@ -49,6 +49,7 @@
## which is a wasted effort. ## which is a wasted effort.
- name: Copy syslinux pxlinux.0 - name: Copy syslinux pxlinux.0
command: "cp {{ ironic_pxelinux_path }} /tftpboot/pxelinux.0" command: "cp {{ ironic_pxelinux_path }} /tftpboot/pxelinux.0"
changed_when: false
## TODO(odyssey4me): Switch this to the copy module and make use of ## 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 ## remote_src: True once we move to Ansible 2.x. For Ansible 1.9x
@ -56,3 +57,4 @@
## which is a wasted effort. ## which is a wasted effort.
- name: Copy syslinux chain.c32 - name: Copy syslinux chain.c32
command: "cp {{ ironic_chainc32_path }} /tftpboot/chain.c32" command: "cp {{ ironic_chainc32_path }} /tftpboot/chain.c32"
changed_when: false

View File

@ -17,5 +17,6 @@
command: "{{ ironic_bin }}/ironic-dbsync upgrade" command: "{{ ironic_bin }}/ironic-dbsync upgrade"
become: yes become: yes
become_user: "{{ ironic_system_user_name }}" become_user: "{{ ironic_system_user_name }}"
changed_when: false
notify: notify:
- Restart ironic services - Restart ironic services

View File

@ -25,8 +25,7 @@
- Restart ironic services - Restart ironic services
- name: Reload init scripts - name: Reload init scripts
shell: | command: initctl reload-configuration
initctl reload-configuration
when: upstart_init | changed when: upstart_init | changed
notify: notify:
- Restart ironic services - Restart ironic services

View File

@ -56,7 +56,7 @@
- name: Install requires pip packages - name: Install requires pip packages
pip: pip:
name: "{{ ironic_requires_pip_packages | join(' ') }}" name: "{{ ironic_requires_pip_packages | join(' ') }}"
state: latest state: "{{ ironic_pip_package_state }}"
extra_args: "{{ pip_install_options_fact }}" extra_args: "{{ pip_install_options_fact }}"
register: install_packages register: install_packages
until: install_packages|success until: install_packages|success
@ -126,7 +126,7 @@
- name: Install pip packages - name: Install pip packages
pip: pip:
name: "{{ ironic_pip_packages | join(' ') }}" name: "{{ ironic_pip_packages | join(' ') }}"
state: latest state: "{{ ironic_pip_package_state }}"
virtualenv: "{{ ironic_bin | dirname }}" virtualenv: "{{ ironic_bin | dirname }}"
virtualenv_site_packages: "no" virtualenv_site_packages: "no"
extra_args: "{{ pip_install_options_fact }}" extra_args: "{{ pip_install_options_fact }}"

View File

@ -38,14 +38,15 @@
- always - always
- name: Post swift tempURL secret key - name: Post swift tempURL secret key
shell: | command: >
OS_ENDPOINT_TYPE=internalURL \ {{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }} \ --os-username "service:{{ glance_service_user_name }}"
--os-username "service:{{ glance_service_user_name }}" \ --os-password {{ glance_service_password }}
--os-password {{ glance_service_password }} \ --os-auth-url {{ keystone_service_internalurl }}
--os-auth-url {{ keystone_service_internalurl }} \ --os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }} \
post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }} post -m temp-url-key:{{ ironic_swift_temp_url_secret_key }}
environment:
OS_ENDPOINT_TYPE: internalURL
when: when:
- inventory_hostname == groups['ironic_all'][0] - inventory_hostname == groups['ironic_all'][0]
- not ironic_standalone | bool - not ironic_standalone | bool
@ -53,14 +54,15 @@
- always - always
- name: Get swift account - name: Get swift account
shell: | shell: >
OS_ENDPOINT_TYPE=internalURL \ {{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }}
{{ ironic_bin }}/swift {{ keystone_service_adminuri_insecure | bool | ternary('--insecure','') }} \ --os-username "service:{{ glance_service_user_name }}"
--os-username "service:{{ glance_service_user_name }}" \ --os-password {{ glance_service_password }}
--os-password {{ glance_service_password }} \ --os-auth-url {{ keystone_service_internalurl }}
--os-auth-url {{ keystone_service_internalurl }} \ --os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }}
--os-identity-api-version {{ keystone_service_internalurl.split('/v')[-1] }} \
stat -v | awk '/StorageURL\:/ {print $2}' stat -v | awk '/StorageURL\:/ {print $2}'
environment:
OS_ENDPOINT_TYPE: internalURL
register: swift_storage_url register: swift_storage_url
when: when:
- (ironic_swift_auth_account is undefined) or (ironic_swift_endpoint is undefined) - (ironic_swift_auth_account is undefined) or (ironic_swift_endpoint is undefined)

View File

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