<p>I am trying to use Terraform to deploy a Kubernetes Cluster and Ansible for deploying K8s objects. Everything works, using <a href="https://docs.ansible.com/ansible/latest/modules/k8s_module.html" rel="nofollow noreferrer">Ansible K8s</a>, also deploying from local YAML files, but when I try to use lookup from url like described <a href="https://github.com/ansible/ansible/issues/48402#issuecomment-546414684" rel="nofollow noreferrer">here</a> I get an error:</p>

<blockquote>
  <p>ERROR! A worker was found in a dead state</p>
</blockquote>

<p>Part of the Ansible Tasks:</p>

<pre><code>- name: Fip-Controller rbac
  k8s:
    api_key: "{{ api_token }}"
    host: "{{ api_url }}"
    state: present
    definition: "{{ item }}"
  with_items: "{{lookup('url', 'https://raw.githubusercontent.com/cbeneke/hcloud-fip-controller/master/deploy/rbac.yaml', split_lines=False) | from_yaml_all | list}}"
  when: item is not none
</code></pre>

<p>I also tried the exact same like described <a href="https://github.com/ansible/ansible/issues/48402#issuecomment-546414684" rel="nofollow noreferrer">here (same link as above)</a>.</p>

<p><a href="https://github.com/ansible/ansible/issues/32554" rel="nofollow noreferrer">A related Github issue with the same error</a></p>

<p>I would be grateful if anybody could point me in any direction. Is there a better solution for adding YAMLs from urls?</p>

<p>Ansible: v2.9.1<br>
OS: macOS Mojave</p>

<p>There is a known problem with using some Python packages under OSX. Exporting this variable solved my problem:</p>

<p><code>export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES</code></p>

<p><a href="https://github.com/ansible/ansible/issues/32499" rel="nofollow noreferrer">See this issue</a></p>
