itnok.update_ubuntu

更新Ubuntu

构建状态 GitHub标签 Ansible角色

在Ubuntu主机上执行apt update && apt dist-upgrade -y的等效操作。

执行的步骤包括:

  • 获取当前Ubuntu运行状态的更新信息
  • 更新apt包缓存
  • 获取可用更新的列表
  • 将所有可升级包升级到最新版本
  • 检查是否需要重启
  • 如有需要则重启机器

:exclamation: 要求

无。

:abcd: 角色变量

无。

要安装依赖关系,请使用:

    $ ansible-galaxy install <dependecy.name>

所需Ansible角色的安装也可以简单地通过以下命令进行:

    $ ansible-galaxy install -r requirements.yml

:notebook: 示例剧本

以下是如何在剧本中使用此角色的示例:

---
- hosts: servers
  remote_user: ubuntu   # 可选(你的远程用户)
  gather_facts: yes     # 可选
  become: yes

  roles:
    - { role: itnok.update_ubuntu }

:guardsman: 许可证

MIT (了解更多)

关于项目

Performs the equivalent of `apt update && apt dist-upgrade -y` on an Ubuntu host.

安装
ansible-galaxy install itnok.update_ubuntu
许可证
mit
下载
4.6k
拥有者