Ok this one was easy .. just did below
value: "{{ r.ansible_facts.ansible_distribution }}{{
r.ansible_facts.ansible_distribution_version }}"
Thanks again Abhi & Stefan Hornburg (Racke)
On Wed, Feb 24, 2021 at 10:11 AM Kiran Kumar wrote:
> "{{ r.ansible_facts.ansible_distribution ~ ' ' ~
>
"{{ r.ansible_facts.ansible_distribution ~ ' ' ~
r.ansible_facts.ansible_distribution_version }}" , works
it gives
Ubuntu 18.04
How to get
Ubuntu18.04
Ie remove the space ?
Will try few things .. Any docs Please on this ? where you go these .. ~
' ' ~ :)
BTW yes, "{{
how about -
"{{ r.ansible_facts.ansible_distribution ~ ' ' ~
r.ansible_facts.ansible_distribution_version }}"
On Wed, Feb 24, 2021 at 3:36 PM Kiran Kumar wrote:
>
> Setup gives :
>
> "ansible_distribution": "Ubuntu",
> "ansible_distribution_file_parsed": true,
>
On 2/24/21 11:04 AM, Kiran Kumar wrote:
>
> Setup gives :
>
> "ansible_distribution": "Ubuntu",
> "ansible_distribution_file_parsed": true,
> "ansible_distribution_file_path": "/etc/os-release",
> "ansible_distribution_file_variety": "Debian",
>
Setup gives :
"ansible_distribution": "Ubuntu",
"ansible_distribution_file_parsed": true,
"ansible_distribution_file_path": "/etc/os-release",
"ansible_distribution_file_variety": "Debian",
"ansible_distribution_major_version": "18",
Wow r.ansible_facts.ansible_lsb.description did worked !!! Thanks again
Abhijit
On Wed, Feb 24, 2021 at 12:17 AM Kiran Kumar wrote:
> Thanks Abhijit, Awesome , it worked
>
> Only issue is
>
> value: "{{ r.ansible_facts.ansible_distribution }}"
> when: vm_info.instance.customvalues.OS !=
>
Thanks Abhijit, Awesome , it worked
Only issue is
value: "{{ r.ansible_facts.ansible_distribution }}"
when: vm_info.instance.customvalues.OS !=
r.ansible_facts.ansible_distribution
that Just give Ubuntu ... is it possible to extract the info from setup
module ie below part..
Thanks a lot Abhijit .. i will give it a try & report issue if any.
On Monday, February 22, 2021 at 9:30:23 PM UTC-8 Abhijeet Kasurde wrote:
> You can do this using dynamic inventory and delegate_to
>
> Here is how -
>
> 1. Gather facts about virtual machines
> 2. Gather facts about custom
You can do this using dynamic inventory and delegate_to
Here is how -
1. Gather facts about virtual machines
2. Gather facts about custom attributes using vmware_guest_info
3. Compare and change if needed
you can see this playbook
---
- hosts: running
tasks:
- setup:
register: r
- debug:
msg:
I will give 1 more reason .. eg someone upgrade OS from 16.04 to 20.04 ..
may forget to update the custom attributes...
On Monday, February 22, 2021 at 2:41:08 PM UTC-8 esxi...@gmail.com wrote:
> Hi
>
> Here are my custom attributes
>
>
> [image: Capture.JPG]
>
>
> Today these are populated
10 matches
Mail list logo