holmesb.ansible_netplan
目录 由 DocToc 生成
ansible-netplan
要求
您可能希望以 become: true
的方式运行该角色
角色变量
依赖关系
示例剧本
以下是一个简单的剧本示例,它设置了一个网络接口。有关可以为此角色设置的所有值,请参见 defaults/main.yml。
---
- hosts: ...你的主机...
any_errors_fatal: true
roles:
- role: ansible-netplan
become: yes
# 除非 netplan_enabled 为 true,否则此角色将不做任何事情。
netplan_enabled: true
# 默认是 /etc/netplan/config.yaml。
netplan_config_file: /etc/netplan/my-awesome-netplan.yaml
# 例如,Ubuntu 18.04 默认使用 networkd。
netplan_renderer: networkd
# 添加单个网络接口的简单网络配置。
netplan_configuration:
network:
version: 2
ethernets:
enp28s0f7:
addresses:
- 10.11.12.99/24
许可证
MIT
作者信息
Larry Smith Jr.