summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/copy/tasks/selinux.yml
blob: dddee6f933ac5dc4f20abaf746bc4d14cec2bc35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# 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
        remote_src: true
  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