Spec-Zone.ru › Ansible

Запуск Ansible с образом community EE

Вы можете запускать Ansible без необходимости создавать собственную EE, используя образы сообщества.

Используйте образ 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
  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

См. также

  • Создание первой среды выполнения
  • Запуск вашей EE
  • Документация Ansible Navigator

© 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