stafwag.etc_hosts

Ansible角色:etc_hosts

这是一个管理/etc/hosts的Ansible角色

需求

角色变量

与操作系统相关的变量

与剧本相关的变量

  • etc_hosts:
    • hosts: 主机数组
      • name: 主机名
      • ip: IP地址
      • state: "absent"|"present"(默认值)

依赖关系

示例剧本

- name: 配置dmz系统上的/etc/hosts
  hosts: dmz
  become: true
  vars:
    etc_hosts:
      hosts:
        - { name: "localhost", ip: "127.0.0.1", state: "present" }
        - { name: "stafgit", ip: "10.10.10.10", state: "absent" }
        - { name: "stafmail", ip: "10.10.10.10", state: "absent" }
  roles:
    - stafwag.etc_hosts

许可证

MIT/BSD

作者信息

创建者:Staf Wagemakers,电子邮件:staf@wagemakers.be,网站:http://www.wagemakers.be。

安装
ansible-galaxy install stafwag.etc_hosts
许可证
mit
下载
401
拥有者