systemli.needrestart

ansible-role-needrestart

ビルドステータス Ansible Galaxy

needrestartをインストールおよび管理するための役割

役割の変数

デフォルト値:

# 管理者にメールで通知する
needrestart_notifyd_disable_email: 0

# その他の通知は無効にする
needrestart_notifyd_disable_write_tty: 1
needrestart_notifyd_disable_needrestart_session: 1
needrestart_notifyd_disable_notify_send: 1

# サービスを再起動するアクション(l)リストのみ、(i)インタラクティブ、または(a)自動的
needrestart_action: l

# 通知されるメールアドレス
needrestart_mail_address: $NR_USERNAME

# 無視するサービス
needrestart_ignorelist: []

# 正規表現でブラックリストに登録するサービス
# 例:
# needrestart_blacklist_rc:
#   - cron\.service
needrestart_blacklist_rc: []

# 正規表現でブラックリストに登録するバイナリ
# 例:
# needrestart_blacklist_bin:
#   - /opt/.*/java
needrestart_blacklist_bin: []

# カスタムneedrestartスクリプト
# 例:
# needrestart_restartd:
#   - name: unbound
#     script: "systemctl restart unbound.service"
needrestart_restartd: []

ダウンロード

最新リリースをansible-galaxyでダウンロード

ansible-galaxy install systemli.needrestart

例プレイブック

- hosts: servers
  roles:
     - { role: systemli.needrestart }

拡張変数の例

# 管理者にメールで通知する
needrestart_disable_email: 0 

## サービスを再起動するアクション(l)リストのみ、(i)インタラクティブ、または(a)自動的
needrestart_action: a

# サービスを再起動する必要があるときに通知されるメールアドレス
needrestart_mail_address: [email protected]

# 自動再起動中に無視するサービス
needrestart_ignorelist:
  groupname:
     - servicename
  Databases:
     - mysql
     - mongodb
  Mail:
     - exim4
     - dovecot
  Webservers:
    - apache2

テストと開発

テスト

Molecule、Docker、およびGitHub Actionsを使用して継続的なテストを行います。 ローカル環境では、次のコマンドで役割を簡単にテストできます。

molecule test 

これにはMolecule、Vagrant、およびpython-vagrantのインストールが必要です。

ライセンス

GPLv3

著者情報

https://www.systemli.org

プロジェクトについて

Install and maintain needrestart software, to check which daemons need to be restarted after library upgrades. Contains tests for Molecule.

インストール
ansible-galaxy install systemli.needrestart
ライセンス
gpl-3.0
ダウンロード
11.4k
所有者
Your friendly tech collective