#################################################################### # WARNING: These are designed specifically for Ansible tests # # and should not be used as examples of how to write Ansible roles # #################################################################### - name: Case A => works certificate_complete_chain: input_chain: "{{ read_certificates['d-leaf'] }}" intermediate_certificates: - '{{ remote_tmp_dir }}/b-intermediate.pem' root_certificates: - '{{ remote_tmp_dir }}/a-root.pem' - name: Case B => doesn't work, but this is expected failed_when: no register: caseb certificate_complete_chain: input_chain: "{{ read_certificates['d-leaf'] }}" intermediate_certificates: - '{{ remote_tmp_dir }}/c-intermediate.pem' root_certificates: - '{{ remote_tmp_dir }}/a-root.pem' - name: Assert that case B failed assert: that: "'Cannot complete chain' in caseb.msg" - name: Case C => works certificate_complete_chain: input_chain: "{{ read_certificates['d-leaf'] }}" intermediate_certificates: - '{{ remote_tmp_dir }}/c-intermediate.pem' - '{{ remote_tmp_dir }}/b-intermediate.pem' root_certificates: - '{{ remote_tmp_dir }}/a-root.pem' - name: Case D => works as well after PR 403 certificate_complete_chain: input_chain: "{{ read_certificates['d-leaf'] }}" intermediate_certificates: - '{{ remote_tmp_dir }}/b-intermediate.pem' - '{{ remote_tmp_dir }}/c-intermediate.pem' root_certificates: - '{{ remote_tmp_dir }}/a-root.pem'