From af625d144bea7dc3e6920bfa3e4959457259e1d2 Mon Sep 17 00:00:00 2001 From: Philippe Pepiot Date: Fri, 21 Aug 2015 10:01:27 +0200 Subject: [PATCH] Set user/group of hello.txt to www-data --- playbook.yml | 3 +++ test_nginx.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/playbook.yml b/playbook.yml index f3e7ddd..f7b26fe 100644 --- a/playbook.yml +++ b/playbook.yml @@ -19,6 +19,9 @@ - name: Create website root file: path=/srv/website state=directory + - name: Set hello.txt owner/group to www-data + file: path=/srv/website/hello.txt owner=www-data group=www-data + - name: Add a nice page copy: content="Hello world" dest=/srv/website/hello.txt diff --git a/test_nginx.py b/test_nginx.py index 52c358e..1ae74be 100644 --- a/test_nginx.py +++ b/test_nginx.py @@ -17,8 +17,8 @@ def test_website_root(File): f = File("/srv/website/hello.txt") assert f.exists assert f.content == "Hello world" - assert f.user == "root" - assert f.group == "root" + assert f.user == "www-data" + assert f.group == "www-data" assert f.mode == 644