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 esxcli
command, which either you need to enable shell each time, or have that
turned on permanently, which leaves a security risk,. I'd rather use
PowerCLI. PS7 on Linux or Mac works fine with PowerCLI. I keep that to
apply Host Profiles and other functions where there are no native vmware
modules.

I have a PowerShell / PowerCLI delegate host dedicated for tasks which do
not have native modules, and delegate those tasks to the delegate host.

HTH,
*Kosala*




On Thu, May 11, 2023 at 3:29 AM Tony Wong <[email protected]> wrote:

> 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 playbook?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/c8b949a8-2024-43eb-9d46-61eead48e170n%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/c8b949a8-2024-43eb-9d46-61eead48e170n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAP7S5HZgXqU9VZwGV5E-cAgJxTwkR9VPbMhzkeBF7d9MOe-EkQ%40mail.gmail.com.

Reply via email to