get the length of insecure_registrys in order for conditional to work properly
- name: Add any insecure registrys to docker config
lineinfile: dest={{ docker_config_dir }}/docker regexp=^INSECURE_REGISTRY= line=INSECURE_REGISTRY="{% for reg in insecure_registrys %}--insecure-registry={{ reg }} {% endfor %}"
- when: insecure_registrys is defined and insecure_registrys > 0
+ when: insecure_registrys is defined and insecure_registrys|length > 0
notify:
- restart docker
tags: configure
