Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getting temporary directory problem #59

Closed
pakyrs opened this issue Aug 4, 2021 · 4 comments
Closed

getting temporary directory problem #59

pakyrs opened this issue Aug 4, 2021 · 4 comments

Comments

@pakyrs
Copy link

pakyrs commented Aug 4, 2021

Hi there,

I am getting:

TASK [aur] *********************************************************************
ok: [local[WARNING]:host]
 Unable to use /home/aur_builder/.ansible/tmp as temporary directory,
failing back to system: [Errno 13] Permission denied: '/home/aur_builder'

My ansible setup is this one

I have one task setting up the aur_builder user
/ansible-pull/roles/common/tasks/aur_user.yml

and another testing the packages:
ansible-pull/roles/common/tasks/AUR.yml

Is this because I am getting root privileges from the start?? How can I get this to work.

Thanks

P

@gotmax23
Copy link
Contributor

gotmax23 commented Aug 4, 2021

Change this line from create_home: no to create_home: yes.

gotmax23 added a commit to gotmax23/ansible-aur that referenced this issue Aug 4, 2021
For certain use cases, the `aur_builder` requires a home directory.

Fixes kewlfft#59
@pakyrs
Copy link
Author

pakyrs commented Aug 5, 2021

Thanks, now I get greeted with this:

TASK [aur] *********************************************************************
[WARNING]: Module remote_tmp /home/aur_builder/.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
fatal: [localhost]: FAILED! => {"changed": false, "cmd": "env LC_ALL=C LANGUAGE=C yay -S --noconfirm --needed --cleanafter package_name", "msg": " -> Could not find all required packages:\n\tpackage_name (Target)", "rc": 1, "stderr": " -> Could not find all required packages:\n\tpackage_name (Target)\n", "stderr_lines": [" -> Could not find all required packages:", "\tpackage_name (Target)"], "stdout": "", "stdout_lines": []}
...ignoring

Am I doing this wrong? If my ansible playbook gets elevated at first to perfom tasks, when it gets to the aur module, it should just use the aur_builder user created.

Thanks

P

@gotmax23
Copy link
Contributor

gotmax23 commented Aug 5, 2021

Now, it seems like it is working correctly. Your problem is that there is no package called package_name.

- Maxwell

@adamantike
Copy link

Should this be fixed, or at least explained a little bit, in the project's Readme? As its example uses create_home: no to create the aur_builder user, since d05e0bc

@kewlfft kewlfft closed this as completed in ba04d0e Sep 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants