--- - name: Converge hosts: all become: true tasks: - name: Create temporary for container configs tempfile: state: directory suffix: container_startup_config_tmp register: container_startup_config_tmp_dir - name: Generate container startup configs container_startup_config: config_data: "{{ lookup('file', playbook_dir + '/files/container-configs.yml', errors='ignore') | default({}, True) | from_yaml }}" config_base_dir: "{{ container_startup_config_tmp_dir.path }}" - name: Check that HAproxy container configuration file was created stat: path: "{{ container_startup_config_tmp_dir.path }}/step_1/haproxy.json" register: st_haproxy failed_when: - not st_haproxy.stat.exists - name: Check that HAproxy container configuration is correct slurp: src: "{{ container_startup_config_tmp_dir.path }}/step_1/haproxy.json" register: slurp_haproxy failed_when: - ('openstack-haproxy' not in slurp_haproxy['content']|b64decode)