Merge pull request #164 from oneswig/master
Provide a non-default hostname for CoreOS systems.
This commit is contained in:
commit
5691086ba2
1 changed files with 8 additions and 0 deletions
|
@ -38,3 +38,11 @@
|
||||||
pip:
|
pip:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
with_items: pip_python_modules
|
with_items: pip_python_modules
|
||||||
|
|
||||||
|
- name: Check configured hostname
|
||||||
|
shell: hostname
|
||||||
|
register: configured_hostname
|
||||||
|
|
||||||
|
- name: Assign inventory name to unconfigured hostnames
|
||||||
|
shell: sh -c "echo \"{{inventory_hostname}}\" > /etc/hostname; hostname \"{{inventory_hostname}}\""
|
||||||
|
when: configured_hostname.stdout == 'localhost'
|
||||||
|
|
Loading…
Reference in a new issue