fix hostname problem
This commit is contained in:
parent
83c3c1b9b3
commit
9108ca7a91
@ -33,7 +33,7 @@ alias sudo='sudo --preserve-env=PATH env' # https://www.petefreitag.com/blog/env
|
|||||||
|
|
||||||
if ! is_scp; then
|
if ! is_scp; then
|
||||||
if [[ "$USER" == "gilles" || "$USER" == "root" ]]; then
|
if [[ "$USER" == "gilles" || "$USER" == "root" ]]; then
|
||||||
host_domain=$(hostname -d)
|
host_domain=$(cat /etc/hostname| rev | cut -d. -f1-2 | rev)
|
||||||
host_fqdn=$(hostname)
|
host_fqdn=$(hostname)
|
||||||
host_short=$(hostname -s)
|
host_short=$(hostname -s)
|
||||||
ip=$(hostname -I)
|
ip=$(hostname -I)
|
||||||
|
|||||||
@ -6,4 +6,4 @@
|
|||||||
line: '{{ item }}'
|
line: '{{ item }}'
|
||||||
state: present
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- '{{ ansible_default_ipv4.address }} {{ ansible_hostname }}.gmotech.net {{ ansible_hostname }}'
|
- '{{ ansible_default_ipv4.address }} {{ ansible_hostname }} {{ ansible_hostname }}.gmotech.net'
|
||||||
Loading…
x
Reference in New Issue
Block a user