Hi!

I am using a playbook `from github created by Reiner Nippes to setup a 
nextcloud server. I changed quite some things to be able to run it on 
OpenSuse Tumbleweed. 

Before running the playbook, /etc/fstab looks like the following:
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /                       btrfs  
defaults                      0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /.snapshots             btrfs  
subvol=/@/.snapshots          0  0
UUID=9d812efe-44e4-4594-affe-37299672ad9e  swap                    swap   
defaults                      0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /var                    btrfs  
subvol=/@/var                 0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /usr/local              btrfs  
subvol=/@/usr/local           0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /srv                    btrfs  
subvol=/@/srv                 0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /root                   btrfs  
subvol=/@/root                0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /opt                    btrfs  
subvol=/@/opt                 0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /home                   btrfs  
subvol=/@/home                0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /boot/grub2/x86_64-efi  btrfs  
subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /boot/grub2/i386-pc     btrfs  
subvol=/@/boot/grub2/i386-pc  0  0
UUID=7388-F693                             /boot/efi               vfat   
defaults                      0  0


In the playbook there is a task to mount /tmp as tmpfs:

- name: mount tmp fs
  mount:
    src: "tmpfs"
    path: "{{ item }}"
    fstype: tmpfs
    opts: "defaults,noatime,nosuid,nodev,noexec,mode=1777"
    passno: "0"
    state: mounted
  with_items:
    - /tmp
    - /var/tmp

The first time I run the playbook, I get this error:
failed: [nextcloud] (item=/tmp) => {"ansible_loop_var": "item", "changed": 
false, "item": "/tmp", "msg": "Error mounting /tmp: umount: /tmp: target is 
busy.

and the file /etc/fstab has a new entry afterwards:
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /                       btrfs  
defaults                      0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /.snapshots             btrfs  
subvol=/@/.snapshots          0  0
UUID=9d812efe-44e4-4594-affe-37299672ad9e  swap                    swap   
defaults                      0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /var                    btrfs  
subvol=/@/var                 0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /usr/local              btrfs  
subvol=/@/usr/local           0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /srv                    btrfs  
subvol=/@/srv                 0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /root                   btrfs  
subvol=/@/root                0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /opt                    btrfs  
subvol=/@/opt                 0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /home                   btrfs  
subvol=/@/home                0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /boot/grub2/x86_64-efi  btrfs  
subvol=/@/boot/grub2/x86_64-efi  0  0
UUID=a34c85bd-79d2-4145-8772-04be970fe413  /boot/grub2/i386-pc     btrfs  
subvol=/@/boot/grub2/i386-pc  0  0
UUID=7388-F693                             /boot/efi               vfat   
defaults                      0  0
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777 0 0

When I run the playbook a second time, I don't get the error anymore and 
all is fine.

I executed "watch -n 1 ls -l /tmp/" to perodically check if ansible is 
writing anything to /tmp, and yes, it is! 
There are some temporary files which appear and disapear during the 
execution. I already added the following two lines to my ansible.cfg file:
local_tmp = /tmp2
remote_tmp = /tmp2

Unfortunately, there are still these "payload" files appearing in /tmp. 
1. Where do they come from? What do they contain and how can I change the 
directory for these files?
I guess these payload files are the reason why the mount module fails in 
the first place. 
2. Am I doing something wrong? 
3. Is a workaround possible? 
4. Has it something to do with the BTRFS filesystem? On Ubuntu this mount 
task is working... 
5. Why is it trying to umount at all? I want it to mount /tmp
I have also made a desktop capture of this behavior: 
https://drive.google.com/open?id=1Ta2-x4wUgoz1Ig3jabooHwVJV4l-SyQ1

Thanks a lot for your help!

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9b9901ce-21a7-41f7-b233-7b43036c5fb0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to