Better fix for different CoreOS os family facts

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
This commit is contained in:
Bogdan Dobrelya
2017-01-05 16:32:08 +01:00
parent c0400e9db5
commit 5af2c42bde
17 changed files with 35 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
---
- name: create temporary resolveconf cloud init file
command: cp -f /etc/resolv.conf "{{ resolvconffile }}"
when: ansible_os_family == "Container Linux by CoreOS"
when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
- name: Remove search/domain/nameserver options
lineinfile:
@@ -48,7 +48,7 @@
- name: get temporary resolveconf cloud init file content
command: cat {{ resolvconffile }}
register: cloud_config
when: ansible_os_family == "Container Linux by CoreOS"
when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
- name: persist resolvconf cloud init file
template:
@@ -57,8 +57,8 @@
owner: root
mode: 0644
notify: Preinstall | update resolvconf for Container Linux by CoreOS
when: ansible_os_family == "Container Linux by CoreOS"
when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
- include: dhclient-hooks.yml
when: ansible_os_family != "Container Linux by CoreOS"
when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
tags: [bootstrap-os, resolvconf]