Fix linting issues
Newer versions of ansible lint are stricter. This change fixes up the issues and ignores rule 405 which requires retries on package items. We're skipping the retries because yum does that natively. Change-Id: I9280a736cb1bdeeb1bdcea11ec4ca8f5af9d1e44
This commit is contained in:
parent
61760f2fc1
commit
2cba7e32b7
|
@ -10,7 +10,9 @@
|
|||
# ANSIBLE0013: Use Shell only when shell functionality is required
|
||||
# ANSIBLE0016: Tasks that run when changed should likely be handlers
|
||||
# this requires refactoring roles, skipping for now
|
||||
SKIPLIST="ANSIBLE0006,ANSIBLE0007,ANSIBLE0010,ANSIBLE0012,ANSIBLE0013,ANSIBLE0016"
|
||||
# 405: Package tasks should have retries. Skipping because yum does
|
||||
# this natively.
|
||||
SKIPLIST="ANSIBLE0006,ANSIBLE0007,ANSIBLE0010,ANSIBLE0012,ANSIBLE0013,ANSIBLE0016,405"
|
||||
|
||||
# Lin the role.
|
||||
ansible-lint -vvv -x $SKIPLIST ./ || lint_error=1
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
when: container_registry_insecure_registries | length > 0
|
||||
notify: restart docker service
|
||||
vars:
|
||||
registry_flags: "{% for reg in container_registry_insecure_registries %}--insecure-registry {{ reg }}{% if not loop.last %} {% endif %}{% endfor %}"
|
||||
registry_flags: --insecure-registry {{ container_registry_insecure_registries | join(' --insecure-registry ') }}
|
||||
|
||||
- name: Create additional socket directories
|
||||
file:
|
||||
|
@ -107,7 +107,7 @@
|
|||
regexp: '^DOCKER_STORAGE_OPTIONS='
|
||||
line: "DOCKER_STORAGE_OPTIONS=' {{ container_registry_storage_options }}'"
|
||||
create: yes
|
||||
when: container_registry_storage_options != ""
|
||||
when: container_registry_storage_options | length > 0
|
||||
notify: restart docker service
|
||||
|
||||
- name: configure DOCKER_NETWORK_OPTIONS in /etc/sysconfig/docker-network
|
||||
|
@ -116,7 +116,7 @@
|
|||
regexp: '^DOCKER_NETWORK_OPTIONS='
|
||||
line: "DOCKER_NETWORK_OPTIONS=' {{ container_registry_network_options }}'"
|
||||
create: yes
|
||||
when: container_registry_storage_options != ""
|
||||
when: container_registry_storage_options | length > 0
|
||||
notify: restart docker service
|
||||
|
||||
- name: ensure docker group exists
|
||||
|
@ -129,7 +129,7 @@
|
|||
name: "{{ container_registry_deployment_user }}"
|
||||
groups: docker
|
||||
append: yes
|
||||
when: container_registry_deployment_user != ""
|
||||
when: container_registry_deployment_user | length > 0
|
||||
|
||||
- name: force systemd to reread configs
|
||||
meta: flush_handlers
|
||||
|
|
Loading…
Reference in New Issue