provision_docker
provision_docker copied to clipboard
impossible to test idempotency of a role
re-running the test that makes use of provision_docker would recreate a docker container making impossible to test idempotency of a role (or set of roles) over the same container I have tried to set the item's restart attribute to false from the inventory, host_vars file and event as vars in the same playbook but the container would always be rebuilt (with a new Container ID) every time the "Bring up inventory group of hosts" task is executed
what actually triggers the recreation of the container indiscriminately is the attribute network_mode
if set to none
it will not rebuild the container...but makes the test useless because you cannot install external componets on it (apt or yum packages for instance)
Maybe a state: present
term would be useful since you could then re-run and check idempotency of a role, or connect to an already present docker container. Making this module potentially usable for creating docker infrastructure and provisioning it for mimicing production environments in docker for development.