Skip to content

Commit

Permalink
Temp override of ansible_hostname
Browse files Browse the repository at this point in the history
Some name fix
  • Loading branch information
ahelal committed Feb 10, 2015
1 parent b518508 commit 4901230
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- name: Set hostname FQDN variable
- name: Temp override for "hostname_fqdn"
set_fact:
hostname_fqdn : "{{ inventory_hostname }}"
when: hostname_fqdn is not defined
Expand All @@ -16,7 +16,12 @@

- name: Set machine hostname
hostname:
name: "{{hostname_short}}"
name: "{{ hostname_short }}"

- name: Temp override facts "hostname_short"
set_fact:
ansible_hostname : "{{ hostname_short }}"
when: ansible_hostname != hostname_short

- name: Ensure hostname is in /etc/hostname
copy:
Expand Down

0 comments on commit 4901230

Please sign in to comment.