Запуск Ansible с образом community EE
Вы можете запустить Ansible без необходимости создания собственного EE, используя образы community.
Используйте образ community-ee-minimal, который включает только ansible-core, или образ community-ee-base, который также включает несколько базовых коллекций. Выполните следующую команду, чтобы увидеть включённые коллекции в образе community-ee-base:
ansible-navigator collections --execution-environment-image ghcr.io/ansible-community/community-ee-base:latest
Выполните следующую ад-хок команду Ansible против localhost внутри контейнера community-ee-minimal:
ansible-navigator exec "ansible localhost -m setup" --execution-environment-image ghcr.io/ansible-community/community-ee-minimal:latest --mode stdout
Теперь создайте простой тестовый плейбук и запустите его против localhost внутри контейнера:
- name: Gather and print local facts
hosts: localhost
become: true
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
© 2012–2018 Michael DeHaan
© 2018–2024 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/getting_started_ee/run_community_ee_image.html