{"id":20402154,"url":"https://github.com/exploide/ansible-role-dnf-automatic","last_synced_at":"2025-04-12T14:23:37.027Z","repository":{"id":2778056,"uuid":"47429225","full_name":"exploide/ansible-role-dnf-automatic","owner":"exploide","description":"This role installs, configures and activates dnf-automatic via Ansible on hosts which use the dnf package manager.","archived":false,"fork":false,"pushed_at":"2024-04-21T15:33:51.000Z","size":27,"stargazers_count":12,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-21T18:51:05.213Z","etag":null,"topics":["ansible","ansible-role","package-manager"],"latest_commit_sha":null,"homepage":"","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exploide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-04T21:17:06.000Z","updated_at":"2024-04-21T15:27:43.000Z","dependencies_parsed_at":"2023-01-11T16:12:26.197Z","dependency_job_id":null,"html_url":"https://github.com/exploide/ansible-role-dnf-automatic","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fansible-role-dnf-automatic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fansible-role-dnf-automatic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fansible-role-dnf-automatic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exploide%2Fansible-role-dnf-automatic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exploide","download_url":"https://codeload.github.com/exploide/ansible-role-dnf-automatic/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224732053,"owners_count":17360416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-role","package-manager"],"created_at":"2024-11-15T04:53:13.007Z","updated_at":"2025-04-12T14:23:37.021Z","avatar_url":"https://github.com/exploide.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-role: dnf-automatic\n\nThis role installs, configures and activates `dnf-automatic` via Ansible on hosts which use the dnf package manager. A possible use case is the automatic installation of security updates.\n\nSee [https://dnf.readthedocs.org/en/latest/automatic.html](https://dnf.readthedocs.org/en/latest/automatic.html) for more information about `dnf-automatic`.\n\n\n## Role Variables\n\nThe variable names are mostly self-explanatory. Beside the fact that the names are role-name prefixed, the names are identical to the preferences for the `dnf-automatic` configuration file. See [https://dnf.readthedocs.org/en/latest/automatic.html#configuration-file-format](https://dnf.readthedocs.org/en/latest/automatic.html#configuration-file-format) for details.\n\nIn particular, the following variables (including their default values) are used:\n\n```yaml\ndnf_automatic_apply_updates: true\ndnf_automatic_download_updates: true\ndnf_automatic_network_online_timeout: 60\ndnf_automatic_random_sleep: 0\ndnf_automatic_upgrade_type: security\ndnf_automatic_emit_via: stdio\ndnf_automatic_system_name: \"{{ ansible_nodename }}\"\ndnf_automatic_send_error_messages: false\ndnf_automatic_command_format: cat\ndnf_automatic_stdin_format: \"{body}\"\ndnf_automatic_email_command_format: \"mail -Ssendwait -s {subject} -r {email_from} {email_to}\"\ndnf_automatic_email_stdin_format: \"{body}\"\ndnf_automatic_email_from: root\ndnf_automatic_email_host: localhost\ndnf_automatic_email_port: 25\ndnf_automatic_email_tls: \"no\"\ndnf_automatic_email_to: root\n\ndnf_automatic_base_overrides: {}\n```\n\nThis default configuration sets `dnf-automatic` up to automatically download and install only security updates.\n\nNote that the `dnf_automatic_base_overrides` dictionary can be used to override arbitrary preferences from the base dnf configuration file for `dnf-automatic`.\n\nIn addition, `dnf_automatic_reboot` can be set to true to perform automatic reboots when installed updates require it:\n\n```yaml\ndnf_automatic_reboot: false\ndnf_automatic_reboot_dependencies: yum-utils\ndnf_automatic_reboot_OnCalendar: \"03:00\"\ndnf_automatic_reboot_AccuracySec: \"15s\"\ndnf_automatic_reboot_Description: \"dnf-automatic-reboot\"\ndnf_automatic_reboot_ExecStart: \"/bin/bash -c '/bin/needs-restarting -r || /sbin/reboot'\"\n```\n\n\n## Dependencies\n\nNo dependencies needed.\n\n\n## Example Playbook\n\nThis example playbook deploys `dnf-automatic` on all hosts but is configured such that all updates are installed automatically, not only security updates.\n\n```yaml\n- name: Example playbook\n  hosts: all\n  remote_user: root\n  roles:\n  - { role: exploide.dnf-automatic, dnf_automatic_upgrade_type: default }\n```\n\nThis example playbook deploys `dnf-automatic` to install security updates only, and deploys additional timer to reboot at 4:00 am when required:\n\n```yaml\n- name: Example playbook with auto reboot\n  hosts: all\n  remote_user: root\n  roles:\n  - { role: exploide.dnf-automatic, dnf_automatic_reboot: true, dnf_automatic_reboot_OnCalendar: \"04:00\" }\n```\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexploide%2Fansible-role-dnf-automatic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexploide%2Fansible-role-dnf-automatic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexploide%2Fansible-role-dnf-automatic/lists"}