diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-07-25 10:05:43 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-07-25 10:05:43 +0300 |
commit | c8fe30533c4d00f31bfdce80e37c964d4325bbb9 (patch) | |
tree | 81638c5105fbfbcd1c076a6db029606b5d5a46b0 /yarns | |
parent | 826e7ea9a3303fa1ea1044b6022992038f40333f (diff) | |
download | ansibleness-c8fe30533c4d00f31bfdce80e37c964d4325bbb9.tar.gz |
Check that willikins works with sftp
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/100-willikins.yarn | 1 | ||||
-rw-r--r-- | yarns/900-implements.yarn | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/yarns/100-willikins.yarn b/yarns/100-willikins.yarn index 697897b..3360925 100644 --- a/yarns/100-willikins.yarn +++ b/yarns/100-willikins.yarn @@ -10,3 +10,4 @@ backups. It is only ever accessed over ssh (including sftp). AND server hostname is as expected AND server account has sudo AND server has python version 2 installed + AND server allows SFTP diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn index f08baee..57f52aa 100644 --- a/yarns/900-implements.yarn +++ b/yarns/900-implements.yarn @@ -61,6 +61,21 @@ exit code for later inspection. echo $? > "$DATADIR/exit" fi +## Access server over SFTP + +Put and get a file over SFTP. + + IMPLEMENTS THEN server allows SFTP + . "$DATADIR/config.sh" + echo test.file > "$DATADIR/sftp.file" + cat > "$DATADIR/sftp.commands" << EOF + put $DATADIR/sftp.file sftp.file + get sftp.file $DATADIR/sftp.file.copy + rm sftp.file + EOF + sftp -b "$DATADIR/sftp.commands" "$ACCOUNT@$SERVER" + cmp "$DATADIR/sftp.file" "$DATADIR/sftp.file.copy" + ## Inspect results of running a command The stdout, stderr, and exit code have been saved. Inspect them. |