ANSIBLE DYNAMIC INVENTORIES MICROSOFT AZURE - HOW TO

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 พ.ย. 2024

ความคิดเห็น • 11

  • @golfmexico
    @golfmexico ปีที่แล้ว +1

    at 16:40 you're looking into why there's an "_" prefix in the output. It's because within keyed_groups you can specify a prefix example: "os". The output of your groups will be "os_redhat" or "os_ubuntu". On the command line if you run ansible -m ping os_redhat it'll target that specific group
    keyed_groups:
    - key: tags.OS
    prefix: "os"

  • @bismarkcastilla1473
    @bismarkcastilla1473 2 ปีที่แล้ว +2

    this video is just amazing, great explanation thank you.

  • @glibmar
    @glibmar 11 วันที่ผ่านมา

    nice video! thank you. What if I have a list of VMs in Azure that have only private IPs and the load balancer has public IP. In LoadBalancer I have NAT ports allocated for each VM. So, from my laptop I connect to these VMs using LoadBalancer IP and port (for example: for VM1 I use localIP (10.0.0.1) and port 8001 and to connect to another VM I use the same IP (10.0.0.1) but another port 8002. Is it possible to create a dynamic inventory and implement the solution with a load balancer?

  • @Alex-mu4ue
    @Alex-mu4ue 2 ปีที่แล้ว

    really helpfull, this is so awesome!

  • @szlaeyer22
    @szlaeyer22 2 ปีที่แล้ว

    Hi, are you familiar with setting up the same in Tower/Controller? Can a standalone inventory be set up like this, using a source control repo as its... source?

    • @TheSudo
      @TheSudo  2 ปีที่แล้ว

      You can configure dynamic inventories in tower / controller. It’s been a hot minute since Iv done it, but it is possible, but there is documentation for it.

    • @szlaeyer22
      @szlaeyer22 2 ปีที่แล้ว

      @@TheSudo Hi, yes, after creating an Azure Resource Manager type credential and inventory, it all went smoothly. However, I'm using the Ansible Automation Platform 2.1 (AAP). As the environment is container-based, I'm still interested in a CLI setup, just for the sake of argument and knowledge. The container won't see the .azure directory in your Ansible users's home, so a credential file is out of the question (at least as far as I know). Adding credentials to the *azure_rm.yml is not good either, as I don't want to push credentials to Bitbucket. Creating system variables doesn't work, either. And lastly, I seem to remember that the inventory command doesn't work with a vault. So, it would be interesting to know how I would set up the same inventory plugin in CLI with AAP. :)

  • @niharikaraj5262
    @niharikaraj5262 2 ปีที่แล้ว

    Can you explain how to put those public keys in new file.. how to fetch.. the whole procedure

    • @TheSudo
      @TheSudo  2 ปีที่แล้ว

      Hey Niharika, you can create those public keys using the ssh-keygen command and following the prompts. The group_vars file in the Ansible files describes the full path to the key once you have created it and placed it in a directory.

  • @kaioalves5160
    @kaioalves5160 5 หลายเดือนก่อน

    As well work in AWS?

    • @TheSudo
      @TheSudo  5 หลายเดือนก่อน

      Yes! I have a video for AWS as well th-cam.com/video/junPdh2yvbU/w-d-xo.html