Answer the question
In order to leave comments, you need to log in
How to upload ansible-playbook to a server that has been shut down?
Let's imagine such a scenario.
We have 1000 servers. At all, you need to update the version of Nginx (let's say a security bugfix).
But we have one of the servers turned off now, because. his power supply burned out.
We update the version of nginx in the ansible playbook and run it on all servers. Yes, we have previously tested everything on a test environment.
Accordingly, nginx will be updated on 999 servers, but not on one (it is turned off).
The power supply was repaired, the server turns on and, HERE IS IMPORTANT, it has an old, unupdated nginx on it.
It's good that I remember that it doesn't have nginx up to date. After turning it on, I can play the playbook again. BUT this is done by hand. But what if I had 10 out of 1000 turned off and they are turned on at different times by different employees?
I want an automatic!
The essence of the question is this: how to automatically play the last up-to-date playbook on it at the start of the server and only after that put it into operation?
For example, we have healt check configured in ha-proxy and if the node is not available, then requests for it are not sent.
And if it is available, then requests for it go. In the example above, from the point of view of ha-proxy, the revived node is quite in order. Responds to inquiries regularly. Only here is the version of nginx there is full of holes.
Please do not cling to nginx. Any software or library could be updated. This does not change the essence of the issue.
Who solves the problem described above?
Or maybe my approach is wrong in general? If yes, then tell me in which direction to look?
Answer the question
In order to leave comments, you need to log in
Ansible сравнит что уже есть на сервере и если выполнение не требуется задание пропустит. Просто запускаете его повторно.
Ну запускаете плейбук по крону. Либо какое то стороннее решение городить с пингом от включенного сервера.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question