1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Debian/Ubuntu doesn't have group nobody so remove the group portion of the new template tests as owner and mode will exercise the problematic code path

This commit is contained in:
Toshio Kuratomi 2014-10-21 01:31:55 -04:00
parent e78c5f925b
commit 43b3eecf52

View file

@ -67,7 +67,7 @@
# VERIFY dest as a directory does not break file attributes # VERIFY dest as a directory does not break file attributes
# Note: expanduser is needed to go down the particular codepath that was broken before # Note: expanduser is needed to go down the particular codepath that was broken before
- name: setup directory for test - name: setup directory for test
file: state=directory dest={{output_dir | expanduser}}/template-dir mode=0755 owner=nobody group=nobody file: state=directory dest={{output_dir | expanduser}}/template-dir mode=0755 owner=nobody group=root
- name: set file mode when the destination is a directory - name: set file mode when the destination is a directory
template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir/ mode=0600 owner=root group=root template: src=foo.j2 dest={{output_dir | expanduser}}/template-dir/ mode=0600 owner=root group=root
@ -82,7 +82,6 @@
- assert: - assert:
that: that:
- "file_attrs.stat.gid == 0"
- "file_attrs.stat.uid == 0" - "file_attrs.stat.uid == 0"
- "file_attrs.stat.pw_name == 'root'" - "file_attrs.stat.pw_name == 'root'"
- "file_attrs.stat.mode == '0600'" - "file_attrs.stat.mode == '0600'"
@ -93,7 +92,6 @@
- assert: - assert:
that: that:
- "dir_attrs.stat.gid != 0"
- "dir_attrs.stat.uid != 0" - "dir_attrs.stat.uid != 0"
- "dir_attrs.stat.pw_name == 'nobody'" - "dir_attrs.stat.pw_name == 'nobody'"
- "dir_attrs.stat.mode == '0755'" - "dir_attrs.stat.mode == '0755'"