GROG.reboot
再起動
ホストを再起動するためのロールです。
前提条件
- ホストはAnsible用にブートストラップされている必要があります(Pythonなどが必要)
- ルート権限が必要です(例:
become: yes
)
ロール変数
変数 | 説明 | デフォルト値 |
---|---|---|
reboot_message |
ログ用の再起動メッセージ | 'Reboot by Ansible' |
reboot_wait |
ホストが再びオンラインになるまで待つか? | 'yes' |
reboot_connect_timeout |
リトライ前の接続タイムアウト | 20 |
reboot_wait_host |
チェック対象のホスト | ansible_ssh_host またはinventory_hostname |
reboot_wait_port |
チェックするポート | ansible_ssh_port または22 |
reboot_wait_regex |
ソケット接続でマッチさせる文字列(例: OpenSSH ) |
/ |
reboot_wait_delay |
ホストをポーリングする前に待つ時間(秒) | 10 |
reboot_wait_timeout |
ホストが正常に再起動するまでのタイムアウト(秒) | 300 |
reboot_wait_ctimeout |
各接続試行のタイムアウト(秒) | 5 |
reboot_interval |
再起動と次のタスクの間に間隔を設けるか? | 'no' |
reboot_interval_seconds |
再起動後の待機時間(秒) | 0 |
注意:
すべてのブール値は、'yes'
/'no'
または true
/false
で使用できます。
これにより、コマンドラインから値を変更できます(例: -e "bool=yes"
)。
依存関係
なし。
例 プレイブック
基本的な再起動を実行する:
---
- hosts: servers
become: yes
roles:
- role: GROG.reboot
reboot_message: 'テスト再起動ロール'
ローリング再起動を実行する:
---
- hosts: servers
become: yes
serial: 1
roles:
- role: GROG.reboot
reboot_interval: 'yes'
reboot_interval_seconds: 60
貢献
すべてのサポート、変更、アイデア 歓迎!
作者
G. Roggemansによる。
ライセンス
MIT