exploide.dnf-automatic
ansible-role: dnf-automatic
このロールは、dnf
パッケージマネージャを使用するホストに対して、Ansibleを介して dnf-automatic
をインストール、設定、アクティブ化します。可能な利用ケースとして、セキュリティアップデートの自動インストールがあります。
dnf-automatic
についての詳細は、こちらをご覧ください。
ロール変数
変数名はほとんど自己説明的です。名前はロール名の接頭辞が付いていることを除いて、dnf-automatic
設定ファイルの設定項目と同じです。詳細は、こちらをご覧ください。
特に、以下の変数(およびそのデフォルト値)が使用されます:
dnf_automatic_apply_updates: true
dnf_automatic_download_updates: true
dnf_automatic_network_online_timeout: 60
dnf_automatic_random_sleep: 0
dnf_automatic_upgrade_type: security
dnf_automatic_emit_via: stdio
dnf_automatic_system_name: "{{ ansible_nodename }}"
dnf_automatic_send_error_messages: false
dnf_automatic_command_format: cat
dnf_automatic_stdin_format: "{body}"
dnf_automatic_email_command_format: "mail -Ssendwait -s {subject} -r {email_from} {email_to}"
dnf_automatic_email_stdin_format: "{body}"
dnf_automatic_email_from: root
dnf_automatic_email_host: localhost
dnf_automatic_email_port: 25
dnf_automatic_email_tls: "no"
dnf_automatic_email_to: root
dnf_automatic_base_overrides: {}
このデフォルトの設定は、dnf-automatic
をセキュリティアップデートのみを自動的にダウンロード・インストールするように設定します。
dnf_automatic_base_overrides
辞書は、dnf-automatic
のために base dnf 設定ファイルから任意の設定を上書きするために使用できます。
さらに、dnf_automatic_reboot
を true に設定すると、インストールされたアップデートが必要な場合に自動再起動が行われます:
dnf_automatic_reboot: false
dnf_automatic_reboot_dependencies: yum-utils
dnf_automatic_reboot_OnCalendar: "03:00"
dnf_automatic_reboot_AccuracySec: "15s"
dnf_automatic_reboot_Description: "dnf-automatic-reboot"
dnf_automatic_reboot_ExecStart: "/bin/bash -c '/bin/needs-restarting -r || /sbin/reboot'"
依存関係
依存関係は必要ありません。
例:プレイブック
この例のプレイブックは、すべてのホストに dnf-automatic
をデプロイしますが、すべてのアップデートが自動的にインストールされるように設定されています(セキュリティアップデートだけでなく)。
- name: 例のプレイブック
hosts: all
remote_user: root
roles:
- { role: exploide.dnf-automatic, dnf_automatic_upgrade_type: default }
この例のプレイブックは、セキュリティアップデートのみをインストールするように dnf-automatic
をデプロイし、必要な場合に午前4時に再起動するための追加のタイマーをデプロイします:
- name: 自動再起動のある例のプレイブック
hosts: all
remote_user: root
roles:
- { role: exploide.dnf-automatic, dnf_automatic_reboot: true, dnf_automatic_reboot_time: "04:00" }
ライセンス
MIT
プロジェクトについて
This role installs, configures and activates dnf-automatic via Ansible on hosts which use the dnf package manager.
インストール
ansible-galaxy install exploide.dnf-automatic
ライセンス
mit
ダウンロード
100.5k
所有者
IT Security guy, open-source enthusiast, likes to keep things simple, <3 Python