diff --git a/roles/0-init/tasks/hostname.yml b/roles/0-init/tasks/hostname.yml index b929e18f1..490d00c80 100644 --- a/roles/0-init/tasks/hostname.yml +++ b/roles/0-init/tasks/hostname.yml @@ -1,22 +1,24 @@ -- name: Turn the crank for systemd +- name: Turn the crank for systemd (debuntu) shell: hostnamectl set-hostname "{{ iiab_hostname }}.{{ iiab_domain }}" when: is_debuntu -- name: Configure /etc/sysconfig/network - template: src=roles/network/templates/network/sysconfig.network.j2 - dest=/etc/sysconfig/network - owner=root - group=root - mode=0644 +- name: Configure /etc/sysconfig/network (redhat) + template: + src: roles/network/templates/network/sysconfig.network.j2 + dest: /etc/sysconfig/network + owner: root + group: root + mode: 0644 when: is_redhat - name: Configure short hostname in /etc/hosts - lineinfile: dest=/etc/hosts - regexp='^127\.0\.0\.1' - line='127.0.0.1 localhost.localdomain localhost box {{ iiab_hostname }}' - owner=root - group=root - mode=0644 + lineinfile: + dest: /etc/hosts + regexp: "^127\.0\.0\.1" + line: "127.0.0.1 localhost.localdomain localhost box {{ iiab_hostname }}" + owner: root + group: root + mode: 0644 #- name: Re-configuring httpd - not initial install # include_tasks: roles/httpd/tasks/main.yml