Hi
below playbook only export 1 ec2 tags
Any please suggestions how can i modify to export all
---
- name: ec2 info
hosts: local
connection: local
tasks:
- name: EC2 info
amazon.aws.ec2_tag_info:
region: us-east-1
validate_certs: no
res
Hi
i have an ec2 with multiple volumes & each vol has tag
the ec2 volumes tag need to keep same just change case , in my case making
all lower will help
eg current tag
abc_Prod_root_vol1
abc_Prod_root_vol2
abc_Prod_root_vol3
...
..
So make them
abc_prod_root_vol1
abc_prod_root_vol2
abc_p
require. Check
> example section for more information -
> https://github.com/ansible-collections/amazon.aws/blob/c5d31d709487afc5df19c60245698532352d80e3/plugins/inventory/aws_ec2.py#L104
>
> On Sun, May 2, 2021 at 8:34 AM esxi...@gmail.com
> wrote:
>
>>
>> hell
hello
i am using ansible-inventory with AWS
I see all EC2 details .. great
Is it possible from the output to extract only some info
eg
To list AWS resources execute the below command:
1
./ec2.py --list
This will return the entire list of AWS resources in JSON.
{
"_meta": {
"hos
Hi Folks
What you folks recommend for below
1. Would need playbooks in version control
2. GUI for folks to run playbooks
3. If you have multiple VMware vCenter data centers & AWS datacenters
ie VMs in various geo locations, hence ansible control node in each site
but the G
Hello
Below is my playbook for the vm creation with template which is windows
server 2019
I saw notes for the module wrt sysprep in :
https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_guest_module.html
" Uses SysPrep for Windows VM (depends on ‘guest_id’ parameter
Thanks, for now i will keep on hold on this very interesting problem as i
have work-around with centos 7
On Monday, March 8, 2021 at 1:05:38 AM UTC-8 dick@geant.org wrote:
> On Mon, 8 Mar 2021 at 09:34, esxi...@gmail.com wrote:
> >
> > None o/p from Ubuntu20x box ..
>
XX@DOMAIN",
"uuid": null,
"validate_certs": false
}
}
}
Read vars_file
'/etc/ansible/playbooks/vm-provision/vars/vcenter-l2-admin.yml'
TASK [Update the Inventory]
*******
I just added 1 more & it was good for me
ln -s /usr/local/bin/ansible-playbook /bin/ansible-playbook
On Monday, March 8, 2021 at 12:05:10 AM UTC-8 esxi...@gmail.com wrote:
>
> Hi Folks
>
> Anyone can suggest anything for below problem
>
>
> For root user i see
Hi Folks
Anyone can suggest anything for below problem
For root user i see below for path :
root: ~ $ # ansible --version
ansible 2.10.6
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules',
'/usr/share/ansible/plugins/modules']
ansib
Thanks will share momentarily
On Sunday, March 7, 2021 at 11:04:09 PM UTC-8 dick@geant.org wrote:
> And a similar output of a successful attempt on your other control node?
>
> On Mon, 8 Mar 2021 at 07:29, esxi...@gmail.com wrote:
>
>> Here is the output
>>
>>
servation_lock": null,
"nested_virt": null,
"num_cpu_cores_per_socket": 1,
"num_cpus": 1,
"scsi": "paravirtual",
"version": null,
"vi
oes variables really are.
> What is in that vars file? Typo? Etc etc
>
> On Mon, 8 Mar 2021 at 04:57, esxi...@gmail.com wrote:
>
>> Hi folks
>>
>> When i use below on a Ubuntu 20.04 ansible control node , vm is created
>> but the OS name shows "none"
>&
Hi folks
When i use below on a Ubuntu 20.04 ansible control node , vm is created but
the OS name shows "none"
Same playbook i am running on a CentOS7 ansible control node the then the
vm name is not none but correct one
Any suggestions on this Please ?
cat vm-create-paramater.yml
---
- hosts
check why the windows box ansible doing ssh .. that is your clue
On Sunday, March 7, 2021 at 6:24:10 PM UTC-8 tdub...@gmail.com wrote:
> any idea why the below is failing for my hosts pa-mgt01?
>
>
> [image: Screen Shot 2021-03-07 at 6.24.28 PM.png]
>
--
You received this message because you a
Found this
https://stackoverflow.com/questions/18195142/safely-limiting-ansible-playbooks-to-a-single-machine
So folks saying better use -e of ansible-playbook
On Saturday, March 6, 2021 at 3:50:48 PM UTC-8 esxi...@gmail.com wrote:
>
> Thanks Again
>
>
> Is below possib
Also how to add this in playbook itself
Any suggestions Please
On Saturday, March 6, 2021 at 12:27:57 PM UTC-8 jruar...@gmail.com wrote:
> Yep, that should do the trick.
>
> El sáb, 6 mar 2021 a las 21:20, esxi...@gmail.com ()
> escribió:
>
>> Tha
host
On Saturday, March 6, 2021 at 5:06:48 AM UTC-8 jruar...@gmail.com wrote:
> You should modify your hosts entry to point to inventory vms and delegate
> to localhost vmware tasks.
>
> Hope that helps,
>
> Regards
>
>
>
>
>
> El sáb, 6 mar 2021 a la
Hi
I am using community.vmware related modules in a playbook .. which updates
tags & reboot vms
In the same vm i would like to patch the VM
Below is the code .. but the yum module here seems not acting on the target
ie "{{ vm_name }" but does not the ansible control node itself
Any suggestio
Thanks Vladimir Botka
On Wednesday, March 3, 2021 at 1:01:59 AM UTC-8 vbo...@gmail.com wrote:
> On Tue, 2 Mar 2021 23:08:50 -0800 (PST)
> "esxi...@gmail.com" wrote:
>
> > but if the entry already present in more than 1 group say .. then it
> does
> > not
for eg
[group1]
server1
server2
[group2]
server1
server2
if you remove from group one & run does not update So lineinfile
should have someway to say the position exactly below [group1] add is
missing ...
On Tuesday, March 2, 2021 at 11:08:50 PM UTC-8 esxi...@gmail.com w
calhost] => (item=a) => {"ansible_loop_var": "item", "backup":
> "", "changed": true, "item": "a", "msg": "line added"}
> changed: [localhost] => (item=b) => {"ansible_loop_var": &q
Hi
I have a playbook which create the vm in vCenter
---
- hosts: localhost
gather_facts: false
connection: local
vars_files:
- ./vars/xxx.yml
tasks:
- name: Create VM using template
vmware_guest:
hostname: "{{ vcenter_server }}"
username: "{{ vcenter_user
OS information
> vmware_guest_custom_attributes:
> name: CentOS7_Rest
> datacenter: Asia-Datacenter1
> folder: /Asia-Datacenter1/vm/
> state: present
> attributes:
> - name: OS
> value: "{{ r.ansible_facts.ansible_distribution }}"
> when: vm_info.instance.customvalues.
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]
>
>
>
Hi
Here are my custom attributes
[image: Capture.JPG]
Today these are populated with
community.vmware.vmware_guest_custom_attributes
But that is manually from the file.. it has human error possible
eg Ubuntu 20.04 folks may type Ubuntu20.4
There is facts which ansible gather has the
bruary 21, 2021 at 1:40:53 PM UTC-8 esxi...@gmail.com wrote:
> Hello
> Is there any way to target only primary OS related packages ?
>
>
> - name: Update all packages to their latest version
> apt:
> name: "*"
> state: latest
>
> At times 3rd Party pack
Hello
Is there any way to target only primary OS related packages ?
- name: Update all packages to their latest version
apt:
name: "*"
state: latest
At times 3rd Party packages are added to /etc/apt/sources.list
So what is best way to just patch the OS & not the app..
Any suggestions to
Hello
In below how can i skip the output when is not relevant or how to do this
better way ?
Thanks
---
-
hosts: temp
become: true
remote_user: ansible
tasks:
- name : check OS version for Ubuntu
raw : lsb_release -a
when: ansible_distribution == 'Debian' or ansible_dis
https://stackoverflow.com/questions/53750049/location-to-keep-ansible-custom-modules
On Sunday, February 14, 2021 at 10:42:59 AM UTC-8 esxi...@gmail.com wrote:
> found a possible issue , vmware modules got installed in root home ...
>
>
>
> /root/.ansible/collections/ansi
gins/modules.
but no luck so far
trying to undersand now to which config parameter installed in home dir &
try re-install to generic location ..
On Saturday, February 13, 2021 at 11:19:35 AM UTC-8 esxi...@gmail.com wrote:
>
> checking below
>
> grep -i plugin /etc
ugins = host_list, virtualbox, yaml, constructed
# uncomment this line to cause the paramiko connection plugin to not record
new host
enable_plugins = community.vmware.vmware_vm_inventory
On Saturday, February 13, 2021 at 10:44:36 AM UTC-8 esxi...@gmail.com wrote:
> yes dir are ok as well..
ath as well?
>
> On Sat, 13 Feb 2021 at 08:05, esxi...@gmail.com wrote:
> >
> > i already tried 777 on that file ... no luck
> >
> > On Friday, February 12, 2021 at 7:38:33 PM UTC-8 Abhijeet Kasurde wrote:
> >>
> >> Hi,
> >>
> >> Can y
on't be able to read it and you will get
> errors.
>
> On Sat, Feb 13, 2021 at 7:53 AM esxi...@gmail.com
> wrote:
>
>> i removed dynamic inv & i can run playbook as jenkins user just fine
>>
>> not sure what the dynamic inv plugin does not like to wo
i removed dynamic inv & i can run playbook as jenkins user just fine
not sure what the dynamic inv plugin does not like to work with non-root
user ..
Any suggestions Please
On Friday, February 12, 2021 at 4:52:08 PM UTC-8 esxi...@gmail.com wrote:
>
> Hi,
>
> When i run
Hi,
When i run below as Jenkins user i get error
ansible-playbook /etc/ansible/playbooks/uptime-inv-based.yml -i
/etc/ansible/playbooks/dc-inv-ALL-vmware.yml
[WARNING]: Failed to load inventory plugin, skipping
community.vmware.vmware_vm_inventory
ERROR! No inventory plugins available to g
y 11, 2021 at 2:32:38 PM UTC-8 esxi...@gmail.com wrote:
> Thanks for the reply.. Yes i already tested with Ubuntu20.04 & it works
> fine... the issue i have is my actual prod ansible server still runs as
> CentOS7 which natively supports Pytrhon2x ... so trying these test on a
TC-8 dick@geant.org wrote:
> Clearly you've mixed everything up. Multiple python3, python2, pips, and
> individual venvs, even running as root.
>
> Perhaps start with a fresh OS, and just a python3 virtualenv?
>
> On Thu, 11 Feb 2021 at 22:59, esxi...@gmail.com wrote:
&
/python3.6/site-packages
Can you please check the environment ??
Not sure about the above .. tried few rsync .. no luck.. @Abhijit any
comment Please
On Thursday, February 11, 2021 at 1:56:05 PM UTC-8 esxi...@gmail.com wrote:
>
>
> ansible --version
> ansible 2.9.17
> con
.@vmware.com
License: License :: OSI Approved :: Apache Software License
Location: /root/ansible-vmware-project/venv/lib/python3.6/site-packages
Requires: requests, six
Required-by: vSphere-Automation-SDK
https://github.com/ansible/ansible/issues/64144
On Thursday, February 11, 2021 at 1:43:57 PM UTC
satisfied: chardet<5,>=3.0.2 in
/root/ansible-vmware-project/venv/lib/python3.6/site-packages (from
requests>=2.3.0->pyvmomi) (4.0.0)
Requirement already satisfied: idna<3,>=2.5 in
/root/ansible-vmware-project/venv/lib/python3.6/site-packages (from
requests>=2.3.0->pyvmomi
0, in
load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
Hi,
Anyone can suggest on below will help. I am getting error when tried to
install VMware vSphere Automation SDK for Python on centos7
Below is my server details
Doc i am following is
https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages
cat /etc
Kasurde wrote:
> No, for different vCenter you need to have multiple configuration files.
>
> On Thu, Feb 11, 2021 at 8:40 AM esxi...@gmail.com
> wrote:
>
>> Is it possible to connect multiple vCenters at same time ?
>>
>> On Sunday, February 7, 2021 at 8:17:41 P
"all": {
> "children": [
> "centos7_64Guest",
> "poweredOff",
> "ungrouped"
> ]
> },
> "centos7_64Guest": {
> "hosts": [
>
fixed
i changed
hosts: localhost
to
hosts: all
On Wednesday, February 10, 2021 at 3:42:24 PM UTC-8 esxi...@gmail.com wrote:
> BTW how to use this as dynamic inv ?
> Tried below
> ansible-playbook uptime-inv-based.yml -i vmware.yml
>
> ---
> ## This playbook i
: uptime_output
- debug: msg="{{uptime_output.stdout_lines}}"
- debug:
var: vars.groups.all
its gives uptime of local box ..
On Tuesday, February 9, 2021 at 7:10:45 PM UTC-8 esxi...@gmail.com wrote:
> Great ...it filter not only based on Tags but custom attri
bution_version" -o =>>
can be used as "value" in above ?
On Monday, February 8, 2021 at 3:46:51 PM UTC-8 esxi...@gmail.com wrote:
> Thanks for Reply Abhijit .. i already saw ur module -
> community.vmware.vmware_guest_custom_attributes
>
> I am d
Great ...it filter not only based on Tags but custom attributes as well...
!!!
On Tuesday, February 9, 2021 at 7:06:40 PM UTC-8 esxi...@gmail.com wrote:
> Please ignore..i removed & re-added the tag & its working .. Thanks @
> Abhijeet
> Kasurde
>
> On Tuesday, Februar
Please ignore..i removed & re-added the tag & its working .. Thanks @ Abhijeet
Kasurde
On Tuesday, February 9, 2021 at 7:01:47 PM UTC-8 esxi...@gmail.com wrote:
> tested on Ubuntu 20.04 ..
>
> I am able to see all vms
>
> eg
>
>
> "xx&quo
04"
],
"tags": [
"Backup-Bronze",
"Ubuntu18.04"
]
}
}
},
As soon as i added
filters:
- OS is defined and OS == 'Ubuntu18.04'
I get below
utomation-sdk-python#installing-required-python-packages
pip install --upgrade pip setuptools
pip install --upgrade
git+https://github.com/vmware/vsphere-automation-sdk-python.git
Per notes in
https://github.com/vmware/vsphere-automation-sdk-python#installing-required-python-packages
Please sugges
LOB = Infra
On Monday, February 8, 2021 at 4:33:47 PM UTC-8 esxi...@gmail.com wrote:
> Abhijit actually i came across that one & tried below .. "per the
> documents" .. which were confusing BTW .. soon i will give link
>
> filters:
> - "tag_category.OS is defi
quot;runtime.connectionState": "connected",
> "summary.runtime.powerState": "poweredOff"
> }
> }
> },
> "all": {
> "children": [
> "centos7_64Guest",
>
"changed": false,
> "instance": {
> "annotation": "",
> "current_snapshot": null,
> "customvalues": {
> "OS": "Windows Server 2019"
> },
> ...
>
wrote:
> Hi,
> I raised a PR to address - how to use filters in vmware_vm_inventory -
> https://github.com/ansible/ansible/pull/71670
> Please provide the feedback.
>
> On Sat, Sep 5, 2020 at 9:10 AM esxi...@gmail.com
> wrote:
>
>> The page
>>
>>
, but the module
> documentation does not mention any such custom attributes.
> If you have an example of your playbook and the resulting data structure?
>
> On Sun, 7 Feb 2021 at 06:03, esxi...@gmail.com wrote:
> >
> > Hi
> >
> > anyone can suggest Please
Hi
anyone can suggest Please if we can update the say a 'custom attribute'
called OS from OS level with below
https://docs.ansible.com/ansible/latest/collections/community/vmware/vmware_vm_info_module.html
Say i want to use Windows 2019 DataCenter .. which is not aviable btw in
vCenter 6.7 ..
Hi,
- name: Provision instance(s)
ec2:
key_name: "{{ key_name }}"
id: "{{ id }}"
group_id: "{{ result_sec_group.group_id }}"
image: "{{ image }}"
instance_type: t2.micro
region: "{{ region }}"
wait: true
sult['iam_users'] }}"
On Sunday, November 8, 2020 at 8:30:17 PM UTC-8 esxi...@gmail.com wrote:
> Hi,
>
> How can i do a debug & see all users ? Any suggestions Please ?
>
>
> https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_
Hi,
How can i do a debug & see all users ? Any suggestions Please ?
https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.iam_user_info_module.rst
# Note: These examples do not set authentication details, see the AWS Guide
for details. # Gather facts about "test" u
12:17:32 AM UTC-7 Abhijeet Kasurde wrote:
> Hi,
> I raised a PR to address - how to use filters in vmware_vm_inventory -
> https://github.com/ansible/ansible/pull/71670
> Please provide the feedback.
>
> On Sat, Sep 5, 2020 at 9:10 AM esxi...@gmail.com
> wrote:
&
The page
https://docs.ansible.com/ansible/devel/scenario_guides/vmware_scenarios/vmware_inventory_hostnames.html
Does not talk or give examples of filter ..
On Friday, September 4, 2020 at 8:25:48 PM UTC-7 esxi...@gmail.com wrote:
> i tested & found below works though
>
i tested & found below works though
filters: - runtime.powerState == "poweredOff"
i am using
ansible 2.9.10
On Friday, September 4, 2020 at 8:16:22 PM UTC-7 esxi...@gmail.com wrote:
> tried but no luck
>
>
> plugin: community.vmware.vmware_vm_inventory
>
ups:
- key: 'tags'
separator: ''
filters:
- guest.GuestFullName == "CentOS 7 (64-bit)"
On Friday, September 4, 2020 at 12:21:46 PM UTC-7 esxi...@gmail.com wrote:
> @abijit reported community.vmware.vmware_vm_inventory but i did not find
>
quot;,"panos_password":"s3cr3tp@ssw0rd"}'
On Friday, September 4, 2020 at 12:21:46 PM UTC-7 esxi...@gmail.com wrote:
> @abijit reported community.vmware.vmware_vm_inventory but i did not find
> doc about it ie what all capabilities its filter has
>
&g
@abijit reported community.vmware.vmware_vm_inventory but i did not find
doc about it ie what all capabilities its filter has
On Friday, September 4, 2020 at 12:12:04 PM UTC-7 esxi...@gmail.com wrote:
> Hi
>
> Needs any suggestion in my case as below
>
> We have vCenter w
Hi
Needs any suggestion in my case as below
We have vCenter where many linux bases vm which are use by other lob, there
is no proper naming standard , no ip based filter possible , no folders
arranged properly
With all this, one thing which is in my control is add "custom
attributes"
Is
I would suggest use Linux as your control host. You mean you want Ansible
to manage Windows OS configs ?
On Sunday, August 23, 2020 at 10:49:28 PM UTC-7 surabhy...@gmail.com wrote:
> Hello Team,
>
> Can any one help me to get steps to install ansible on a windows 2012 R
> server.
>
> Thanks,
>
S version in template ?? 2008r2/2012/2012r2
> etc ??
>
> Thanks,
> Piyush
>
>
> On Thu, 27 Aug, 2020, 5:35 am esxi...@gmail.com,
> wrote:
>
>> Hi
>>
>> Any help is much appreciated .. Here is summary of issue :
>>
>> Module :
>>
I found the issue, the admin account was disabled & auto login was
on...made auto login false & is good now
On Wednesday, August 26, 2020 at 5:05:13 PM UTC-7 esxi...@gmail.com wrote:
> Hi
>
> Any help is much appreciated .. Here is summary of issue :
>
> Module :
&
Hi
Any help is much appreciated .. Here is summary of issue :
Module :
vmware_guest
Error :
"msg": "Failed to create a virtual machine : Cannot complete customization."
Ansible Version :
ansible 2.9.10
Playbook :
---
- hosts: localhost
gather_facts: false
connection: local
vars_files
72 matches
Mail list logo