You've already forked ansible-role-common
fix: Don't try add network config no RHEL 🐛
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
debug:
|
||||
msg: "Virtualization is: {{ ansible_virtualization_type }}"
|
||||
|
||||
- name: Ensure DNS and SSH common config
|
||||
- name: Ensure Network Setup (RedHat only)
|
||||
template:
|
||||
src: "{{ network_config.src }}"
|
||||
dest: "{{ network_config.dest }}"
|
||||
@@ -16,8 +16,25 @@
|
||||
mode: u+rw,
|
||||
a+r,
|
||||
}
|
||||
when: >
|
||||
ansible_virtualization_type != "docker"
|
||||
and ansible_virtualization_type != "container"
|
||||
and ansible_os_family == "RedHat"
|
||||
loop_control:
|
||||
loop_var: network_config
|
||||
tags: dns
|
||||
|
||||
- name: Ensure Resolvers Configured
|
||||
template:
|
||||
src: "{{ network_config.src }}"
|
||||
dest: "{{ network_config.dest }}"
|
||||
mode: "{{ network_config.mode }}"
|
||||
backup: yes
|
||||
with_items:
|
||||
- { src: etc.resolv.conf.j2, dest: /etc/resolv.conf, mode: u+rw, a+r }
|
||||
when: ansible_virtualization_type != "docker" and ansible_virtualization_type != "container"
|
||||
when: >
|
||||
ansible_virtualization_type != "docker"
|
||||
and ansible_virtualization_type != "container"
|
||||
loop_control:
|
||||
loop_var: network_config
|
||||
tags: dns
|
||||
|
||||
Reference in New Issue
Block a user