-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code for Chapter 11 #283
Comments
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. |
@fama - Good suggestion! I've been meaning to try to get all the code from Chapter 10 into this repo, if nothing else so it can be tested via CI. For your second question, see some possible helpful pages: |
(Updating title as chapter 10 is now chapter 11 in the next version of the book.) |
Thanks again for opening this! Almost all the example code is now in the playbook in this directory: https://github.com/geerlingguy/ansible-for-devops/tree/master/security |
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: