summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-07-24 23:54:12 +0300
committerLars Wirzenius <liw@liw.fi>2015-07-24 23:54:12 +0300
commitcde6831504c83769199462126ed635bd5177d821 (patch)
treef72baf47891459890daf6cd98c61636beb317200 /yarns
parent5265e26397597a5333c179842d3e0a41b769de96 (diff)
downloadansibleness-cde6831504c83769199462126ed635bd5177d821.tar.gz
Add step for checking hostname
Diffstat (limited to 'yarns')
-rw-r--r--yarns/100-willikins.yarn4
-rw-r--r--yarns/900-implements.yarn8
2 files changed, 9 insertions, 3 deletions
diff --git a/yarns/100-willikins.yarn b/yarns/100-willikins.yarn
index d12e45e..1ea8f24 100644
--- a/yarns/100-willikins.yarn
+++ b/yarns/100-willikins.yarn
@@ -6,6 +6,4 @@ backups. It is only ever accessed over ssh (including sftp).
SCENARIO willikins backup server
GIVEN server name is willikins
THEN server responds to ping
-
- WHEN running ssh willikins hostname
- THEN output matches willikins
+ AND server hostname is as expected
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index d4b1ee5..2ffee04 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -16,6 +16,14 @@ Does the server respond to a ping?
. "$DATADIR/config.sh"
ping -c1 "$SERVER"
+## Check server hostname
+
+Does the server's hostname match its domain name?
+
+ IMPLEMENTS THEN server hostname is as expected
+ . "$DATADIR/config.sh"
+ ssh "$SERVER" hostname | grep -Fx "$SERVER"
+
## Running command over ssh
Run a command on the server over ssh, capturing stdout and stderr and