Spec-Zone.ru › Ansible

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 ghcr.io/ansible-community/community-ee-base:latest

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 ghcr.io/ansible-community/community-ee-minimal:latest --mode stdout

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

- name: Gather and print local facts
  hosts: localhost
  gather_facts: true
  tasks:

   - name: Print facts
     ansible.builtin.debug:
      var: ansible_facts
ansible-navigator run test_localhost.yml --execution-environment-image ghcr.io/ansible-community/community-ee-minimal:latest --mode stdout

See also

  • Building your first Execution Environment
  • Running your EE
  • Ansible Navigator documentation

© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/getting_started_ee/run_community_ee_image.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API