elastic / ansible-elastic-cloud-enterprise

Ansible playbooks for Elastic Cloud Enterprise (ECE)

Home Page:https://www.elastic.co/products/ece

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Always assumes that network interface is called eth0

xucito opened this issue · comments

commented

The playbook always assumes that the network interface is eth0.

in main.yml

- name: ensure dhcp dns is set
  lineinfile:
    path: /etc/sysconfig/network-scripts/ifcfg-eth0
    line: "{{ item }}"
  with_items:
    - 'PeerDNS=yes'
    - 'NM_CONTROLLED=yes'

My suggestion is to allow this to be passed via variable.

Agreed, it should be configurable.

Hi
my suggestion is to completly remove this task from the playboo, because even if we correct the path, I think it is not necessary to set these options, because if PeerDNS is not set, it defaults to yes, the same as with NM_CONTROLLED, which also defaults to yes.

Or, we make the interface name configurable via ansible variables (and should default to ens192) we should also add this to at least the RedHat-7 installation tasks as well.

I can submit an PR when we agree on one of the options

I just checked on Centos7 (this task only runs for Centos 7) and NM_CONTROLLED is set to no and PeerDNS is not set.
Maybe we can use a variable here (with eth0 as default), or we set those parameters for all eth* interfaces.
@vaubarth any preference?