ansible/test/integration/targets/copy/tasks/selinux.yml
Rick Elrod 688cd8657b
Fix string/bytestring comparsion in m_u.basic (#70439)
Change:
- module_utils.basic.is_special_selinux_path() used a string ==
  bytestring comparison which returned False and made Ansible think that
  certain filesystems aren't, in fact, special-cased, when they should
  be. Ensure both sides of the == are bytestrings.

Test Plan:
- Added `copy` integration tests for this case.

Tickets:
- Fixes #70244

Signed-off-by: Rick Elrod <rick@elrod.me>
2020-07-07 11:48:05 -04:00

35 lines
796 B
YAML

# Ensure that our logic for special filesystems works as intended
# https://github.com/ansible/ansible/issues/70244
- block:
- name: Install dosfstools
yum:
name: dosfstools
state: present
- name: Create a file to use for a fat16 filesystem
command: dd if=/dev/zero of=/fat16 bs=1024 count=10240
- name: mkfs.fat
command: mkfs.fat -F16 /fat16
- name: Mount it
command: mount /fat16 /mnt
- name: Copy a file to it
copy:
src: /etc/fstab
dest: /mnt/fstab
always:
- name: Unmount it
command: umount /mnt
ignore_errors: true
- name: Nuke /fat16
file:
path: /fat16
state: absent
- name: Uninstall dosfstools
yum:
name: dosfstools
state: absent