mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
move hostname.yml
This commit is contained in:
parent
4416cf5e55
commit
db38c9a1d0
2 changed files with 4 additions and 4 deletions
27
roles/0-init/tasks/hostname.yml
Normal file
27
roles/0-init/tasks/hostname.yml
Normal file
|
@ -0,0 +1,27 @@
|
|||
- name: Turn the crank for systemd
|
||||
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
|
||||
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
|
||||
|
||||
- name: Re-configuring httpd - not initial install
|
||||
include_tasks: roles/httpd/tasks/main.yml
|
||||
when: iiab_stage|int > 3
|
||||
|
||||
#- name: Re-configuring rest of networking - not initial install
|
||||
# include_tasks: roles/network/tasks/main.yml
|
||||
# when: iiab_stage|int > 4
|
|
@ -199,7 +199,7 @@
|
|||
value: '{{ FQDN_changed }}'
|
||||
|
||||
- name: Now changing FQDN
|
||||
include_tasks: roles/2-common/tasks/hostname.yml
|
||||
include_tasks: hostname.yml
|
||||
when: FQDN_changed
|
||||
|
||||
- name: STAGE 0 HAS COMPLETED ======================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue