If this is the only thing you're planning on doing with Ansible, I would go
for a single playbook. In my repository, I have roles for
enter_maintenance_mode and exit_maintenance_mode, since that function is
used in multiple contexts.
In my environment rather than performing a SSH to ESXi and run
Yes, that was me, LOL.
Even a single playbook can be "parameterized" to use variables you supply via
command line or a vars file. That offers reuse.
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
On May 12, 2023, at 11:54 AM, Kevin Knox wrote:
Hmmm.
Hmmm. My reply did not post. Maybe I replied to the user?
Anyway, my vote is to consider "roles" to be an enhancement. I have to be
very certain I'm going to reuse the role before I will create it. If I'm
not sure, then I call the creation of a role "gold plating" and
unnecessary. So, I will
I agree with Dick. Is this something you will do over and over so taking the
time makes sense? Or is this a once-and-done task?
Also look at the tools VMware offers. Ansible isn't always the right solution.
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
If you just want the quickest option then go for a playbook.
If you can spend some time on this then you could create a role that is
meant for patching ESX hosts, and that includes helper tasks to handle the
maintenance mode and the reboot.
Endless possibilities to do this, from quick and dirty to
I got a few tasks i need to do on esxi host
1. put in maintenace mode
2. copy vib from my laptop to the the host shared datastore
3. install the patch
esxcli softare vib install -d /path/xxx.zip
4. reboot the host
5. take it out of maintenance mode
do i create roles for these or single