Here is how I tested changes to the testnodes role recently in a VM. It's a little different than the README.rst (that instructs users to edit files in /etc/ansible, for example)
- Create a new CentOS or RHEL VM on my laptop
- Create a local
hosts file with the IP of my VM, like:
[testnodes]
192.168.122.31 ansible_user=centos ansible_ssh_extra_args="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
- To debug SSH connections, try running Ansible's
setup module, like:
ansible testnodes -i hosts -m ansible.builtin.setup | less
- Finally, run the playbook on the VM:
ansible-playbook -i hosts -v testnodes.yml
... then examine the files or features on the VM to make sure they do what I expect.
We could edit README to make it simpler and match this procedure.
Here is how I tested changes to the
testnodesrole recently in a VM. It's a little different than the README.rst (that instructs users to edit files in/etc/ansible, for example)hostsfile with the IP of my VM, like:setupmodule, like:... then examine the files or features on the VM to make sure they do what I expect.
We could edit README to make it simpler and match this procedure.