On 13.06.2019 21:21, 'Georg Großmann' via Ansible Project wrote:
> 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.
> 

<snip />

> 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

/var/tmp is defined as a persistent tmp, and changing this to tmpfs might break 
other software that depends on /var/tmp being persistent.

And changing them on a running system is not recommended since other software 
might be using the tmp.
The best approach is to use state: present and reboot. 


> 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

Default they are pointing to ~/.ansible/tmp


> 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.

A grep in the source it seams that some module and plugins have /tmp hard coded 
and maybe the code you are running is creating files in tmp.


> 2. Am I doing something wrong?

Sort of, use present and reboot.


> 3. Is a workaround possible?

See 2.

> 4. Has it something to do with the BTRFS filesystem? On Ubuntu this mount
> task is working...

No. 


-- 
Kai Stian Olstad

-- 
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/fd0b7f1b-c9bc-9cfd-be2e-52c6e0a08320%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to