Skip to content

Running Ansible with the community EE image

You can run ansible without the need to build a custom EE using community images. Use the community-ee-minimal image that includes only ansible-core or the community-ee-base image that also includes several base collections.

Run the following command to see the collections included in the community-ee-base image:

ansible-navigator collections --execution-environment-image

Run the following Ansible ad-hoc command against localhost inside the community-ee-minimal container:

ansible-navigator exec "ansible localhost -m setup" --execution-environment-image --mode stdout

Now, create a simple test playbook and run it against localhost inside the container:

cat > test_localhost.yml<<EOF
- name: Gather and print local facts
  hosts: localhost
  become: yes
  gather_facts: yes

  - name: Print facts
      var: ansible_facts
ansible-navigator run test_localhost.yml --execution-environment-image --mode stdout

Want to discuss the community EE images and other EE-related topics? Join the forum group!

See also