Ansible Execution Environments

Поділитися
Вставка
  • Опубліковано 11 вер 2024
  • This video will cover how what are execution environments, why they exist, how they make ansible development easier, the pieces involved in building them, and how I leverage Ansible to streamline the entire build process for me.
    The presenter is Alex Dworjan
    GitHub:
    github.com/sha...
    Blogs:
    www.ansible.co...
    www.ansible.co...

КОМЕНТАРІ • 27

  • @ericames-xs4fh
    @ericames-xs4fh Рік тому +1

    Thanks for the video!!

  • @ThomasMcManus-eh7cq
    @ThomasMcManus-eh7cq Рік тому +1

    Very helpful, thank you

  • @joshuaduplaa9033
    @joshuaduplaa9033 Рік тому +1

    I love you for this

  • @user-gx5iz9ln7p
    @user-gx5iz9ln7p Рік тому

    Thanks for the demo!! How do we pass multiple environment variables to the execution environment before the playbook is executed on the target m/c??

    • @alexdworjan
      @alexdworjan  Рік тому

      www.techbeatly.com/how-to-pass-environment-variables-to-ansible-navigator/
      This is the easiest way to describe it if you are using ansible-navigator. If you are using automation controller, you can set environment variables as credentials which would then be passed into the EE if you assign it as a credential for the Job Template.

  • @SV-lw8jo
    @SV-lw8jo 10 місяців тому

    One aspect I do not see is the process of installing an RPM file into the environment. Do you have any info on that?

    • @alexdworjan
      @alexdworjan  10 місяців тому

      That's what I show at 9:58 in the bindep.txt. This is where you define any system dependencies which are RPM for RHEL based systems.

    • @SV-lw8jo
      @SV-lw8jo 10 місяців тому

      Thanks, I missed it. @@alexdworjan

  • @rastyraheem3566
    @rastyraheem3566 8 місяців тому

    thank you sir for such information , but please where we can get those files? because i could not find that main.yml file in the repo , thank you

    • @alexdworjan
      @alexdworjan  8 місяців тому +1

      There are 3 different examples in the Ansible-PAH repo, build_creationee, build_shadowmandevspaces, build_shadowmanee

    • @rastyraheem3566
      @rastyraheem3566 8 місяців тому

      thank you@@alexdworjan

  • @user-tf1gk6bi3r
    @user-tf1gk6bi3r 8 місяців тому

    how do u use a base image present in the vm? i dont want to access the internet for it.

    • @alexdworjan
      @alexdworjan  8 місяців тому

      With Ansible Builder Version 3, you can use any base image ua-cam.com/video/YTtBW2rDNE4/v-deo.html

  • @chinvannak1076
    @chinvannak1076 Рік тому

    Thanks for the demo. Can we add the collection to the existing Execution Environment?

    • @alexdworjan
      @alexdworjan  Рік тому

      I would recommend re-building the execution environment if the collection you are using has any dependencies associated with it. If you just want to add collections at runtime in automation controller, you can add a collections/requirements.yml to your repository with the additional collections you want to add

    • @chinvannak1076
      @chinvannak1076 Рік тому

      @@alexdworjan Appreciate your answer. I have the requirements.yml in my ansible role directory. But the collections are not found as my execution environment doesn't include those collections.

    • @alexdworjan
      @alexdworjan  Рік тому

      @@chinvannak1076 This only applies if I'm using Automation Controller / Ansible Tower during a project sync. And it also is specifically looking for the folder "collections/requirements.yml" to input existing collections at runtime. It can't be in a role directory, it must be from the project root.

    • @chinvannak1076
      @chinvannak1076 Рік тому

      @@alexdworjan Thanks, that was helpful. Just another small issue, I got a certificate that failed while trying to install collections from the private hub. Appreciate your advice.

    • @alexdworjan
      @alexdworjan  Рік тому

      @@chinvannak1076 If that's while you are installing collections in Controller during a project sync, my guess is that you are using self-signed certificates. If that's the case, you'll need to go into Settings, Jobs, and toggle the switch for "Ignore Ansible Galaxy SSL Certificate Verification" Otherwise you'll want to have your corporate certs on both Controller and Private Automation Hub

  • @cemery50
    @cemery50 Рік тому

    Why not dockers and/or virtual machine images....,
    and does it integrate with online dependencies ?
    and how does it integrate with universal security and depug (?eclipse)....
    can it boot from bare metal, hybrid cloud, k-clouds, ceph stores....

    • @alexdworjan
      @alexdworjan  Рік тому +2

      The execution environment can use podman or docker as the container engine, but it isn't designed to be a stand-alone system that you are running or booting. The purpose of an execution environment is to be a portable way to easily run Ansible playbooks without needing to install system packages and python libraries on the VM itself. All of the necessary dependencies are contained in the EE so it makes standing up a new Ansible server extremely fast. It can integrate with some IDE like VS Code for easier editing.

    • @12dodo37
      @12dodo37 8 місяців тому

      ​@@alexdworjanWe can install vscode inside the EE? How can i edit file with vscode inside the container? Or you said completly another thing...?

    • @alexdworjan
      @alexdworjan  8 місяців тому +1

      @@12dodo37 No, VSCode with the Ansible extension can leverage the EE that you create. This means VSCode would be using Ansible+Ansible-Lint+all of the collections I have installed. So VSCode would be installed on your laptop (or use Code Server). I walk through all the different options in this playlist: ua-cam.com/video/C8908KSjn78/v-deo.html&pp=gAQBiAQB

    • @12dodo37
      @12dodo37 8 місяців тому

      ​@@alexdworjan Thank you for the rapid response! Im going to check that now!

  • @ThomasMcManus-eh7cq
    @ThomasMcManus-eh7cq Рік тому +1

    Very helpful, thank you