Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
49a6af13
Commit
49a6af13
authored
Sep 15, 2014
by
Toshio Kuratomi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test that file touch does not keep a new file if we failed to set its
attributes
parent
a44ea2d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
test/integration/roles/test_file/tasks/main.yml
+23
-0
No files found.
test/integration/roles/test_file/tasks/main.yml
View file @
49a6af13
...
@@ -65,6 +65,29 @@
...
@@ -65,6 +65,29 @@
-
name
:
change ownership and group
-
name
:
change ownership and group
file
:
path={{output_dir}}/baz.txt owner=1234 group=1234
file
:
path={{output_dir}}/baz.txt owner=1234 group=1234
-
name
:
setup a tmp-like directory for ownership test
file
:
path=/tmp/worldwritable mode=1777 state=directory
-
name
:
Ask to create a file without enough perms to change ownership
file
:
path=/tmp/worldwritable/baz.txt state=touch owner=root
sudo
:
yes
sudo_user
:
nobody
register
:
chown_result
ignore_errors
:
True
-
name
:
Ask whether the new file exists
stat
:
path=/tmp/worldwritable/baz.txt
register
:
file_exists_result
-
name
:
Verify that the file doesn't exist on failure
assert
:
that
:
-
"
chown_result.failed
==
True"
-
"
file_exists_result.stat.exists
==
False"
-
name
:
clean up
file
:
path=/tmp/worldwritable state=absent
-
name
:
create soft link to file
-
name
:
create soft link to file
file
:
src={{output_file}} dest={{output_dir}}/soft.txt state=link
file
:
src={{output_file}} dest={{output_dir}}/soft.txt state=link
register
:
file5_result
register
:
file5_result
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment