You're using localhost as the target, which is OK for the vmware
module (as that is an API based one), but then you also target
localhost for the docker stuff.
Split your deployment into separate playbook and make sure you're
targeting the correct host.
This may involve add_host etc.
I wish i could separate them as you have told me but i am very new to ansible and I am using it for my final project. I dont know how to do that. I changed the host to the target node’s name. I think you are right because the localhost does the installation of the docker on the control node. But I do not know what to do.
I wish i could separate them as you have told me but i am very new to ansible and I am using it for my final project. I dont know how to do that. I changed the host to the target node's name. I think you are right because the localhost does the installation of the docker on the control node. But I do not know what to do.
Here is a sample ansible playbook; don't know who wrote it. Take a
look at it. Ask questions. Once you understand it, what you are trying
to do should make sense.