roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.51k stars 607 forks source link

Bug: Module remote_tmp /root/.ansible/tmp did not exist [...] #1308

Open strarsis opened 3 years ago

strarsis commented 3 years ago

Description

What's wrong?

During initial Trellis playbook run the following warning is emitted:

Module remote_tmp /root/.ansible/tmp did not exist [...]

What have you tried?

Searched for that warning.

What insights have you gained?

The warning can be prevented by setting a field.

Possible solutions

Set the remote-tmp field (see https://docs.ansible.com/ansible/2.4/intro_configuration.html#remote-tmp)

Temporary workarounds

The warning can be ignored, though the warning also states that this may cause issues with permissions at a later time.

Steps To Reproduce

  1. Apply the Trellis playbook on a clean Ubuntu 20.04 LTS system Notice the warning during the playbook run.

Expected Behavior

Ideally, no warnings should be mitted.

Actual Behavior

Warning is emitted, that can be avoided by setting an option.

Relevant Log Output

No response

Trellis Version

Fix #1277 - Disable PHP CLI memory limit (#1278)

Ansible Version

ansible 2.9.10
  config file = None
  configured module search path = ['/home/build/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.8.10 (default, Jun  2 2021, 10:49:15) [GCC 9.4.0]

Trellis CLI Version

(Not applicable; not used)

swalkinshaw commented 2 years ago

@strarsis do you always encounter this warning? I've never seen it so I'm not exactly sure how we could prevent/fix it in these cases.

remote-tmp could be set to something else, but we'd also have to create it first which might be hard because it would have be created before Ansible runs 🤔

strarsis commented 6 days ago

@swalkinshaw: I encountered this warning again on an initial provision with a new, clean Ubuntu 24.04 LTS system:

WARNING]: Module remote_tmp /root/.ansible/tmp did not exist and was created
with a mode of 0700, this may cause issues when running as another user. To
avoid this, create the remote_tmp dir with the correct permissions manually