claranet.motd

Ansible 角色 - motd

维护者 许可证 发布 状态 Ansible 版本 Ansible Galaxy

:star: 在 GitHub 上给我们星标 — 这对我们很有鼓励!

安装和配置动态 MOTD

此角色默认使用 https://github.com/claranet/motd 来获取 MOTD

系统信息:
  主机名··········: claranet_motd_ubuntu-20.04
  发行版··········: Ubuntu 20.04.3 LTS
  内核···········: Linux 5.10.47-linuxkit
  运行时间········: 运行 2 天 23 小时 18 分钟
  负载···········: 1.33 (1分钟), 0.43 (5分钟), 0.20 (15分钟)
  进程···········: 13 (root), 3 (用户), 16 (总计)
  CPU··············: Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz (4 vCPU)
  内存···········: 626Mi 已用, 2.6Gi 可用, 3.8Gi 总计
  本地 IP·········: 172.17.0.6

磁盘使用情况:
  /                               9% 已用, 总计 63G
  [====··············································]

Ansible:
  上次部署···: 2021-09-27T13:33:33.665714Z

:warning: 要求

Ansible >= 2.10

:zap: 安装

ansible-galaxy install claranet.motd

:gear: 角色变量

变量 默认值 描述
motd_disable_default_motd true 禁用系统默认的 MOTD (/etc/motd)
motd_template https://raw.githubusercontent.com/claranet/motd/master/scripts/00-basic 动态 MOTD 模板
可以是 URL 或本地模板
motd_template_prepend "" motd_template 前添加原始内容
motd_template_append 参见 defaults/main.yml motd_template 后添加原始内容
motd_template_username "" motd_template 为 URL 时使用
motd_template_password "" motd_template 为 URL 时使用

:pencil2: 示例 Playbook

---
- hosts: all
  roles:
    - role: claranet.motd
      motd_template: "{{ playbook_dir }}/templates/dynmotd.j2"

:closed_lock_with_key: 增强安全性

:heart_eyes_cat: 贡献

Mozilla 公共许可证第 2.0 版

关于项目

Install and configure dynamic MOTD

安装
ansible-galaxy install claranet.motd
许可证
mpl-2.0
下载
47.1k
拥有者
Open source projects from and contributed to by Claranet.