As the generated inventory look like a pair of instance name - ip
(see above), I need to test recipe using the variable ansible_host
with an IP value and not the instance name.
So the generated inventory look like:
[all]
idm ansible_host=10.0.1.1
client1 ansible_host=10.0.1.2
[client]
client1 ansible_host=10.0.1.2
Thus the molecule.yml
contains:
platforms:
- name: idm
image: quay.io/freeipa/freeipa-server:rocky-8-4.9.6
pre_build_image: true
privileged: false
network: testing
hostname: idm.org.test
command: ipa-server-install -U --realm=ORG.TEST --domain=org.test --ds-password=IsASecret --admin-password=IsASecret --hostname=idm.org.test
- name: client1
image: quay.io/rockylinux/rockylinux
pre_build_image: true
privileged: false
network: testing
hostname: client1.org.test
groups:
- all
- client
Following this configuration I am able to put into the same network these 2 instances but I can not assign a static IP to them. Moreover here, ansible_host
take the instance name as value (idm
, client1
).
Note: as it is wrote in title I use molecule-podman to create instances and test
Thanks for your help
Best regards