有关网络接口的未定义事实

时间:2018-10-26 13:02:56

标签: docker ansible

我正在使用docker ubuntu镜像并在其上运行ansible。 “ {{hostvars [inventory_hostname] ['ansible_'+ private_netif] ['ipv4'] ['address']}}“

脚本失败,因为未定义ansible_eth0

1 个答案:

答案 0 :(得分:0)

请注意,当使用来自ubuntu:18.04的docker image时,ansible不会收集有关网络接口的事实。它有助于安装iproute2软件包。

RUN apt-get update
RUN apt-get install -y iproute2
相关问题