{"id":21189,"date":"2022-12-22T15:13:56","date_gmt":"2022-12-22T14:13:56","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=21189"},"modified":"2025-01-24T10:42:58","modified_gmt":"2025-01-24T09:42:58","slug":"create-and-manage-ansible-execution-environments","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/","title":{"rendered":"Create and manage Ansible Execution Environments"},"content":{"rendered":"\n<p>by Alexandre Nestor<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-introduction\">Introduction<\/h2>\n\n\n\n<p>What is an Ansible Execution Environnement, by the way ?<\/p>\n\n\n\n<p>As per RedHat definition an Ansible Execution Environment (EE) <strong>is a standard way to build and distribute the environment that automation runs in, which reduces complexity and makes it faster and simpler to develop and deploy automation<\/strong>. <\/p>\n\n\n\n<p>More simple, an EE is a container, by default [<a href=\"https:\/\/docs.podman.io\/en\/latest\/index.html, Podman\" target=\"_blank\" rel=\"noreferrer noopener\">Podman<\/a>], which contains everything needed to execute  ansible jobs and playbooks, including <code>python<\/code>, <code>ansible-core<\/code>, libraries and dependencies, and all stuff that you want add.  And of course, It can be distributed as any container.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-1024x657.png\" alt=\"\" class=\"wp-image-21190\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-1024x657.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-300x193.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-768x493.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020.png 1217w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>By default when you install Ansible Automation Platform these execution environments are installed by default, but you can build your owns.<\/p>\n\n\n\n<p>Here what you got by default: <\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Short Name<\/th><th>Container image<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td>Minimal<\/td><td>ee-minimal-rhel8<\/td><td>A minimal automation execution environment based on Ansible Core&nbsp;2.11. only includes the&nbsp;ansible.builtin<\/td><\/tr><tr><td>Supported<\/td><td>ee-supported-rhel8<\/td><td>An automation execution environment based on Ansible Core&nbsp;2.11 that includes Red&nbsp;Hat Ansible Certified Content Collections and their software dependencies.<\/td><\/tr><tr><td>Compatibility<\/td><td>ee-2rhel9<\/td><td>An automation execution environment based on Ansible&nbsp;2.9.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>All certified container images are <a href=\"https:\/\/catalog.redhat.com\/software\/containers\/search\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a><\/p>\n\n\n\n<p>The aim of this post is to build an EE from scratch.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-vm-configuration\">The VM configuration<\/h2>\n\n\n\n<p>I used a new test VM, with a fresh Ubuntu installation<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~]$  grep DISTRIB_DESCRIPTION \/etc\/lsb-release                                                                                                                                  \nDISTRIB_DESCRIPTION=&quot;Ubuntu 22.04.1 LTS&quot;\n\n&#x5B;ubuntu:~]$ sudo apt-get install podman\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-install-ansible-navigator\">Install Ansible Navigator<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~]$ python3 -m pip install ansible-navigator --user\n\n&#x5B;ubuntu:~]$ python3 -m pip install ansible-builder --user\n\n&#x5B;ubuntu:~]$ python3 -m pip install ansible-runner --user\n\n&#x5B;ubuntu:~]$ echo &#039;export PATH=$HOME\/.local\/bin:$PATH&#039; &gt;&gt; ~\/.profile\n\n&#x5B;ubuntu:~]$ source ~\/.profile\n\n&#x5B;ubuntu:~]$ ansible-navigator\n--------------------------------------------------------------------\nExecution environment image and pull policy overview\n--------------------------------------------------------------------\nExecution environment image name:     quay.io\/ansible\/creator-ee:v0.9.1\nExecution environment image tag:      v0.9.1\nExecution environment pull arguments: None\nExecution environment pull policy:    tag\nExecution environment pull needed:    True\n--------------------------------------------------------------------\nUpdating the execution environment\n--------------------------------------------------------------------\nRunning the command: podman pull quay.io\/ansible\/creator-ee:v0.9.1\nTrying to pull quay.io\/ansible\/creator-ee:v0.9.1...\nGetting image source signatures\nCopying blob fee18ea417d6 &#x5B;======================================] 47.2MiB \/ 47.2MiB\n.....\n<\/pre><\/div>\n\n\n<p>At first execution <code>ansible-navigator <\/code>pull the <code>creator-ee<\/code> image.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-prepare-the-build-process\">Prepare the build process<\/h2>\n\n\n\n<p>Create a working directory to prepare the files that you need to build the EE container image. The&nbsp;<code>ansible-builder<\/code>&nbsp;command searches in this working directory for its&nbsp;<code>execution-environment.yml<\/code>&nbsp;configuration file, which is used to build the container image.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~]$ mkdir my-builder-env\n\n&#x5B;ubuntu:~]$ cd my-builder-env\n\n&#x5B;ubuntu:~\/my-builder-env]$\n\n&#x5B;ubuntu:~\/my-builder-env]$ cat execution-environment.yml\n\n---\nversion: 1\n\nbuild_arg_defaults:\n  EE_BASE_IMAGE: registry.redhat.io\/ansible-automation-platform-20-early-access\/ee-minimal-rhel8\n  EE_BUILDER_IMAGE: registry.redhat.io\/ansible-automation-platform-20-early-access\/ansible-builder-rhel8\n\nansible_config: ansible.cfg \ndependencies:\n  galaxy: requirements.yml \n  python: requirements.txt\n  system: bindep.txt\nadditional_build_steps:\n\tprepend:\n\t\t- ADD my_tuf \/usr\/share\/my\/stuff\n\tappend:\n\t\t- COPY .... \n<\/pre><\/div>\n\n\n<ul class=\"wp-block-list\">\n<li><code>EE_BASE_IMAGE<\/code> : this is the container image to use as starting point. For public access use <code>quay.io\/ansible\/ansible-runner:stable-2.11-latest<\/code>.<\/li>\n\n\n\n<li><code>EE_BUILDER_IMAGE<\/code>: selects the container to use to build the final image. This is optional.<\/li>\n\n\n\n<li>The <code>dependencies<\/code> sections list all dependencies to be added in the builded container:\n<ul class=\"wp-block-list\">\n<li><code>requirements.yml<\/code> for additional ansible collections.<\/li>\n\n\n\n<li><code>requirements<\/code>.<code>txt<\/code> for additional python modules.<\/li>\n\n\n\n<li><code>bindeb.txt <\/code>for additional packages.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><code>additional_build_steps<\/code> list all optional steps to be executed at the container creation. These are usual commands used in container creation process.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code>ansible.cfg<\/code>, <code>requirements.yml<\/code>, <code>requirements<\/code>.<code>txt<\/code> and <code>bindeb.txt<\/code> files content:<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/my-builder-env]$ cat ansible.cfg\n\n&#x5B;galaxy]\nserver_list = galaxy\n\n&#x5B;galaxy_server.galaxy]\nurl=https:\/\/galaxy.ansible.com\/\n\n\n# Add community.aws and community.general to the EE container\n&#x5B;ubuntu:~\/my-builder-env]$ cat requirements.yml\n---\ncollections:\n  - community.aws\n  - community.general\n\n\n# Add json and requests to the EE container.\n&#x5B;ubuntu:~\/my-builder-env]$ cat requirements.txt\njson\nrequests\n\n\n# Add rsync and git to the EE container.\n&#x5B;ubuntu:~\/my-builder-env]$ cat bindep.txt\nrsync \ngit\nzsh\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-build-the-container-image\">Build the container image<\/h2>\n\n\n\n<p><strong>Note<\/strong>: To use Red&nbsp;Hat container registry that hosts the default images,&nbsp;<code>ee-minimal-rhel8<\/code>&nbsp;and&nbsp;<code>ansible-builder-rhel8<\/code> a Redhat subscription is needed (see <code>EE_BASE_IMAGE<\/code> field)<\/p>\n\n\n\n<p>For public access use <code>quay.io\/ansible\/ansible-runner:stable-2.11-latest<\/code> instead.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/my-builder-env]$ podman login registry.redhat.io\nUsername: foo@bar.com\nPassword:\nLogin Succeeded!\n\n&#x5B;ubuntu:~\/my-builder-env]$ ansible-builder build --tag ee-test:v1.0\nRunning command:\n  podman build -f context\/Containerfile -t ee-test:v1.0 context\nComplete! The build context can be found at: \/home\/ubuntu\/my-builder-env\/context\n\n&#x5B;ubuntu:~\/my-builder-env]$ cd context\n&#x5B;ubuntu:~\/my-builder-env\/context]$ tree\n.\n|-- Containerfile\n`-- _build\n    |-- ansible.cfg\n    |-- bindep.txt\n    |-- requirements.txt\n    `-- requirements.yml\n<\/pre><\/div>\n\n\n<p>The execution environment builder operates in two steps which can be executed separately:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>The command creates the&nbsp;<code>context\/<\/code>&nbsp;directory in the current directory. In that directory, it creates the&nbsp;<code>Containerfile<\/code>&nbsp;file, the equivalent of a&nbsp;<code>Dockerfile<\/code>&nbsp;file, which contains instructions for the&nbsp;<code>podman build<\/code>&nbsp;command. It also creates an&nbsp;<code>_build\/<\/code>&nbsp;subdirectory and then copies your&nbsp;<code>requirements.yml<\/code>,&nbsp;<code>ansible.cfg<\/code>,&nbsp;<code>requirements.txt<\/code>, and&nbsp;<code>bindep.txt<\/code>&nbsp;files into it, so that the build process can access them.<\/li>\n\n\n\n<li>The command then runs the&nbsp;<code>podman build<\/code>&nbsp;command, which constructs the resulting automation execution environment container image.<\/li>\n<\/ol>\n\n\n\n<p>To execute only the first step use the command <code>ansible-builder create<\/code> command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~ ]$ cd my-builder-env\n&#x5B;ubuntu:~\/my-builder-env]$ ls\nansible.cfg bindep.txt execution-environment.yml requirements.txt requirements.yml\n\n&#x5B;ubuntu:~\/my-builder-env]$ ansible-builder create\nComplete! The build context can be found at: ubuntu:~\/my-builder-env\/context]\n\n&#x5B;ubuntu:~\/my-builder-env]$ tree\n.\n\u251c\u2500\u2500 ansible.cfg\n\u251c\u2500\u2500 bindep.txt\n\u251c\u2500\u2500 context\n\u2502   \u251c\u2500\u2500 _build\n\u2502   \u2502\u00a0\u00a0 \u251c\u2500\u2500 ansible.cfg\n\u2502   \u2502\u00a0\u00a0 \u251c\u2500\u2500 bindep.txt\n\u2502   \u2502\u00a0\u00a0 \u251c\u2500\u2500 requirements.txt\n\u2502   \u2502\u00a0\u00a0 \u2514\u2500\u2500 requirements.yml\n\u2502   \u2514\u2500\u2500 Containerfile\n\u251c\u2500\u2500 execution-environment.yml\n\u251c\u2500\u2500 requirements.txt\n\u2514\u2500\u2500 requirements.yml\n\n\n<\/pre><\/div>\n\n\n<p>The file <code>Containerfile<\/code> can be edited to add extra stuff: <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/my-builder-env]$ cd context\n\n&#x5B;ubuntu:~\/my-builder-env\/context ]$ cat Containerfile\n\nARG EE_BASE_IMAGE=registry.redhat.io\/ansible-automation-platform-20-early-access\/ee-minimal-rhel8\nARG EE_BUILDER_IMAGE=registry.redhat.io\/ansible-automation-platform-20-early-access\/ansible-builder-rhel8\n\nFROM $EE_BASE_IMAGE as galaxy\nARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS=\nARG ANSIBLE_GALAXY_CLI_ROLE_OPTS=\nUSER root\n\nADD _build\/ansible.cfg ~\/.ansible.cfg\n\nADD _build \/build\nWORKDIR \/build\n\nRUN ansible-galaxy role install $ANSIBLE_GALAXY_CLI_ROLE_OPTS -r requirements.yml --roles-path &quot;\/usr\/share\/ansible\/roles&quot;\nRUN ANSIBLE_GALAXY_DISABLE_GPG_VERIFY=1 ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path &quot;\/usr\/share\/ansible\/collections&quot;\n\nFROM $EE_BUILDER_IMAGE as builder\n\nCOPY --from=galaxy \/usr\/share\/ansible \/usr\/share\/ansible\n\nADD _build\/requirements.txt requirements.txt\nADD _build\/bindep.txt bindep.txt\nRUN ansible-builder introspect --sanitize --user-pip=requirements.txt --user-bindep=bindep.txt --write-bindep=\/tmp\/src\/bindep.txt --write-pip=\/tmp\/src\/requirements.txt\nRUN assemble\n\nFROM $EE_BASE_IMAGE\nUSER root\n\nCOPY --from=galaxy \/usr\/share\/ansible \/usr\/share\/ansible\n\nCOPY --from=builder \/output\/ \/output\/\nRUN \/output\/install-from-bindep &amp;&amp; rm -rf \/output\/wheels\nLABEL ansible-execution-environment=true\n<\/pre><\/div>\n\n\n<p>To execute the build step:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/my-builder-env]$ podman build -f context\/Containerfile -t ee-test context\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-testing-the-created-ee-container\">Testing the created EE container<\/h2>\n\n\n\n<p>The image can be started as any other <code>podman<\/code> image, installed collections should be under the path <code>\/usr\/share\/ansible\/collections\/ansible_collections <\/code>at container level:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/my-builder-env\/context]$ podman images\n\nREPOSITORY                                                                            TAG         IMAGE ID      CREATED        SIZE\nlocalhost\/ee-test                                                                     v1.0        a524ff8039ed  3 minutes ago  678 MB\nquay.io\/ansible\/creator-ee                                                            v0.9.1      d1524b4410d0  2 months ago   1.4 GB\nregistry.redhat.io\/ansible-automation-platform-20-early-access\/ee-minimal-rhel8       latest      19186d4e0970  5 months ago   372 MB\nregistry.redhat.io\/ansible-automation-platform-20-early-access\/ansible-builder-rhel8  latest      26582aeee896  5 months ago   340 MB\n<\/pre><\/div>\n\n\n<p><strong>Note:<\/strong> to list the existent EE containers the<code> ansible-navigator <\/code>command can be used:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~]$ ansible-navigator images {-m stdout} \n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"809\" height=\"536\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image-2.png\" alt=\"\" class=\"wp-image-21196\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image-2.png 809w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image-2-300x199.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/image-2-768x509.png 768w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/figure>\n\n\n\n<p>The created image has the IMAGE_ID <code>a524ff8039ed<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/my-builder-env]$ podman run -it a524ff8039ed \/bin\/bash\n\n&#x5B;root@82cd58122b15 \/]# ls \/usr\/share\/ansible\/collections\/ansible_collections\namazon\tcommunity\n\n&#x5B;root@82cd58122b15 \/]# python3 --version\nPython 3.8.13\n\n&#x5B;root@82cd58122b15 \/]# git --version\ngit version 2.31.1\n<\/pre><\/div>\n\n\n<p>Let&#8217;s create a playbook to use, from the added <code>community.general<\/code> collection  (see <code>requirements.yml<\/code> file), the <code>community.general.python_requirements_info<\/code> module.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~ ]$ cd $HOME\n\n&#x5B;ubuntu:~ ]$ mkdir test\n\n&#x5B;ubuntu:~\/test]$ cat test_playbook.yml\n---\n- name: Testing a custom Ansible Content Collection\n  hosts: localhost\n\n  tasks:\n    - name: Show python lib\/site paths\n      community.general.python_requirements_info:\n      register: answer\n\n    - name: print output\n      ansible.builtin.debug:\n        msg: &quot;{{ answer }}&quot;\n\n<\/pre><\/div>\n\n\n<p>Run the test playbook <code>test_playbook.yml<\/code>:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/test]$ ansible-navigator run test_playbook.yml  --eei localhost\/ee-test:v1.0 --pp never -b -m stdout\n\n&#x5B;WARNING]: provided hosts list is empty, only localhost is available. Note that\nthe implicit localhost does not match &#039;all&#039;\n\nPLAY &#x5B;Testing a custom Ansible Content Collection] *****************************\n\nTASK &#x5B;Gathering Facts] *********************************************************\nok: &#x5B;localhost]\n\nTASK &#x5B;Show python lib\/site paths] **********************************************\nok: &#x5B;localhost]\n\nTASK &#x5B;print output] ************************************************************\nok: &#x5B;localhost] =&gt; {\n    &quot;msg&quot;: {\n        &quot;changed&quot;: false,\n        &quot;failed&quot;: false,\n        &quot;mismatched&quot;: {},\n        &quot;not_found&quot;: &#x5B;],\n        &quot;python&quot;: &quot;\/usr\/bin\/python3.8&quot;,\n        &quot;python_system_path&quot;: &#x5B;\n            &quot;\/tmp\/ansible_community.general.python_requirements_info_payload_xand6vtb\/ansible_community.general.python_requirements_info_payload.zip&quot;,\n            &quot;\/usr\/lib64\/python38.zip&quot;,\n            &quot;\/usr\/lib64\/python3.8&quot;,\n            &quot;\/usr\/lib64\/python3.8\/lib-dynload&quot;,\n            &quot;\/usr\/local\/lib64\/python3.8\/site-packages&quot;,\n            &quot;\/usr\/local\/lib\/python3.8\/site-packages&quot;,\n            &quot;\/usr\/lib64\/python3.8\/site-packages&quot;,\n            &quot;\/usr\/lib\/python3.8\/site-packages&quot;\n        ],\n        &quot;python_version&quot;: &quot;3.8.13 (default, Jun 14 2022, 17:49:07) \\n&#x5B;GCC 8.5.0 20210514 (Red Hat 8.5.0-13)]&quot;,\n        &quot;python_version_info&quot;: {\n            &quot;major&quot;: 3,\n            &quot;micro&quot;: 13,\n            &quot;minor&quot;: 8,\n            &quot;releaselevel&quot;: &quot;final&quot;,\n            &quot;serial&quot;: 0\n        },\n        &quot;valid&quot;: {}\n    }\n}\n\nPLAY RECAP *********************************************************************\nlocalhost                  : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0\n\n&#x5B;ubuntu:~\/test]$ \n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-publish-the-container-to-the-hub\">Publish the container to the hub<\/h2>\n\n\n\n<p>Let&#8217;s tag our EE image (not mandatory but nice )<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/test]$ podman tag localhost\/ee-test:v1.0 myhub.example.com\/mytestnamespace\/ee-test:latest\n\n&#x5B;ubuntu:~\/test]$ podman images | grep ee-test\nmyhub.example.com\/mytestnamespace\/ee-test                                             latest      a524ff8039ed  8 days ago    678 MB\nlocalhost\/ee-test                                                                     v1.0        a524ff8039ed  8 days ago    678 MB\n<\/pre><\/div>\n\n\n<p>Push the image to the hub:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;ubuntu:~\/test]$ podman login myhub.example.com\nUsername: foo@bar.com\nPassword:\n\n&#x5B;ubuntu:~\/test]$ podman push myhub.example.com\/mytestnamespace\/myhub.example.com\/mytestnamespace\/ee-test:latest\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Using ansible tools from a container give the possibility to standardise even more the environnements deployment. As you can see, there is nothing new under the sun. Build a <code>podman<\/code>\/<code>docker<\/code> container never need RedHat ansible dedicated tools. What is new, is that using <code>ansible-builder<\/code>, give you the possibility to start from a standard container which is supposed to follow all the best practice. The opening sentence, that EE &#8220;<strong>is a standard way to build and distribute the environment that automation runs in, which reduces complexity and makes it faster and simpler to develop and deploy automation<\/strong>.&#8221; takes on its full meaning.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>by Alexandre Nestor Introduction What is an Ansible Execution Environnement, by the way ? As per RedHat definition an Ansible Execution Environment (EE) is a standard way to build and distribute the environment that automation runs in, which reduces complexity and makes it faster and simpler to develop and deploy automation. More simple, an EE [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1321,955,368,1320,1504,42],"tags":[2600,2431],"type_dbi":[],"class_list":["post-21189","post","type-post","status-publish","format-standard","hentry","category-ansible","category-cloud","category-development-performance","category-devops","category-docker","category-operating-systems","tag-ansible-2","tag-ansible-tower"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Create and manage Ansible Execution Environments - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create and manage Ansible Execution Environments\" \/>\n<meta property=\"og:description\" content=\"by Alexandre Nestor Introduction What is an Ansible Execution Environnement, by the way ? As per RedHat definition an Ansible Execution Environment (EE) is a standard way to build and distribute the environment that automation runs in, which reduces complexity and makes it faster and simpler to develop and deploy automation. More simple, an EE [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-22T14:13:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-24T09:42:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1217\" \/>\n\t<meta property=\"og:image:height\" content=\"781\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Create and manage Ansible Execution Environments\",\"datePublished\":\"2022-12-22T14:13:56+00:00\",\"dateModified\":\"2025-01-24T09:42:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/\"},\"wordCount\":674,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-1024x657.png\",\"keywords\":[\"Ansible\",\"ansible tower\"],\"articleSection\":[\"Ansible\",\"Cloud\",\"Development &amp; Performance\",\"DevOps\",\"Docker\",\"Operating systems\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/\",\"name\":\"Create and manage Ansible Execution Environments - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-1024x657.png\",\"datePublished\":\"2022-12-22T14:13:56+00:00\",\"dateModified\":\"2025-01-24T09:42:58+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020.png\",\"contentUrl\":\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020.png\",\"width\":1217,\"height\":781},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create and manage Ansible Execution Environments\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create and manage Ansible Execution Environments - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/","og_locale":"en_US","og_type":"article","og_title":"Create and manage Ansible Execution Environments","og_description":"by Alexandre Nestor Introduction What is an Ansible Execution Environnement, by the way ? As per RedHat definition an Ansible Execution Environment (EE) is a standard way to build and distribute the environment that automation runs in, which reduces complexity and makes it faster and simpler to develop and deploy automation. More simple, an EE [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/","og_site_name":"dbi Blog","article_published_time":"2022-12-22T14:13:56+00:00","article_modified_time":"2025-01-24T09:42:58+00:00","og_image":[{"width":1217,"height":781,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020.png","type":"image\/png"}],"author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Create and manage Ansible Execution Environments","datePublished":"2022-12-22T14:13:56+00:00","dateModified":"2025-01-24T09:42:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/"},"wordCount":674,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-1024x657.png","keywords":["Ansible","ansible tower"],"articleSection":["Ansible","Cloud","Development &amp; Performance","DevOps","Docker","Operating systems"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/","url":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/","name":"Create and manage Ansible Execution Environments - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020-1024x657.png","datePublished":"2022-12-22T14:13:56+00:00","dateModified":"2025-01-24T09:42:58+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/12\/Pasted-image-20221213094020.png","width":1217,"height":781},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/create-and-manage-ansible-execution-environments\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create and manage Ansible Execution Environments"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/21189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=21189"}],"version-history":[{"count":59,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/21189\/revisions"}],"predecessor-version":[{"id":36877,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/21189\/revisions\/36877"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=21189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=21189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=21189"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=21189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}