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"
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?
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?
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.
@@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. :)
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.
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"
this video is just amazing, great explanation thank you.
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?
really helpfull, this is so awesome!
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?
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.
@@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. :)
Can you explain how to put those public keys in new file.. how to fetch.. the whole procedure
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.
As well work in AWS?
Yes! I have a video for AWS as well th-cam.com/video/junPdh2yvbU/w-d-xo.html