summaryrefslogtreecommitdiff
path: root/hostname.yml
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2016-03-29 18:39:24 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2016-03-30 12:34:56 +0000
commit803daf845ffd70892ff889f88709421e9d72007f (patch)
treef83d1c805fb4a03496a40b28640b45d1decc87eb /hostname.yml
parenta69dfa347ca8f4dd7797ed4e968c3b9a9318b80d (diff)
downloadansible-playbooks-803daf845ffd70892ff889f88709421e9d72007f.tar.gz
hostname.yml: Helper playbook to set real hostname on (almost) all servers.
This is a separate utility playbook intended for occasional (possibly, one-time) tweaking of hostnames on old servers which lack it being set consistently. Any newer servers will be set up properly by ITS. Change-Id: Id58bbb33d6ff425e65af6bcde8b07e50de160e72 Reviewed-on: https://review.linaro.org/11094 Reviewed-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Diffstat (limited to 'hostname.yml')
-rw-r--r--hostname.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/hostname.yml b/hostname.yml
new file mode 100644
index 0000000..b58a868
--- /dev/null
+++ b/hostname.yml
@@ -0,0 +1,11 @@
+---
+# This is a utility playbook for occasional fixing of hostnames on old
+# servers. It is not intended to be run all the time, just on occasions.
+# For new servers, ITS will make needed setup (and this playbook will
+# become deprecated).
+- hosts: all
+ gather_facts: no
+ become: yes
+ tasks:
+ - name: Set hostname
+ hostname: name={{inventory_hostname}}