I love the book and the videos. Would it be possible to upload the code for chapter 11. Copying from the ebook does not work well.
Also, if you build a new server and change the ssh port and default user, the inventory needs to be updated. Is it possible to build the server fully with ansible (changing the ssh port means that the local inventory file needs to be updated and further ansible playbook need to use the new port. What is your recommendation?
The text was updated successfully, but these errors were encountered:
I'm extremely interested in this question as well. The only way I have found is to write a batch script to run the initial playbook that does the change and generates a new inventory file, then runs a second playbook using the new inventory. There is a way to manipulate the in-memory inventory (https://docs.ansible.com/ansible/latest/modules/list_of_inventory_modules.html), but that doesn't generate a new inventory file.