我正在使用cloudconfig文件向系统添加新的ip地址。但出于某种原因,它只是不加ip地址。有人能帮帮我吗?
以下是我的cloudconfig文件的内容:
#cloud-config
coreos:
coreos:
units:
- name: update-sysctl.service
command: start
content: |
[Unit]
Description=Update sysctl values written by cloud-config
[Service]
Type=oneshot
ExecStart=ip addr add 172.31.118.62 dev eth0:1
ExecStart=ip addr add 172.31.118.63 dev eth0:2
ExecStart=ip addr add 172.31.118.64 dev eth0:3发布于 2016-01-23 07:43:01
实际上,我并没有给出完整的命令路径,这就是为什么它不能工作的原因。下面给出的配置是一个工作配置!
#cloud-config
coreos:
units:
- name: update-sysctl.service
command: start
content: |
[Unit]
Description=Update sysctl values written by cloud-config
[Service]
Type=oneshot
ExecStart=/bin/ip addr add 172.31.118.62 dev eth0:1
ExecStart=/bin/ip addr add 172.31.118.63 dev eth0:2
ExecStart=/bin/ip addr add 172.31.118.64 dev eth0:3https://stackoverflow.com/questions/34960450
复制相似问题