Sto tentando di riavviare il server che esegue CentOS 7
su VirtualBox. Io uso questo compito:Come riavviare CentOS 7 con Ansible?
- name: Restart server
command: /sbin/reboot
async: 0
poll: 0
ignore_errors: true
Server viene riavviato, ma ottengo questo errore:
TASK: [common | Restart server] ***********************************************
fatal: [rolcabox] => SSH Error: Shared connection to 127.0.0.1 closed.
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
FATAL: all hosts have already failed -- aborting
Che cosa sto facendo di sbagliato? Come posso risolvere questo?
Sulla base della risposta fornita di Marcin Skarbek Ho preparato e pubblicato sul ruolo di Ansible Galaxy che cosa usa quel metodo. Il ruolo Reboot-And-Wait è possibile trovare [qui] (https://galaxy.ansible.com/it-praktyk/Reboot-And-Wait/). Grazie per l'utilizzo, i feedback sono i benvenuti. –
A causa del rapido sviluppo di Ansible, le risposte più vecchie non funzionano più per me. Per favore dai un'occhiata alla mia risposta. – Telegrapher