-
Notifications
You must be signed in to change notification settings - Fork 35
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
aptly role getting "ERROR: mkdir $HOME: permission denied" in aptly calls in tasks/repositories.yml #481
Comments
Hello @timblaktu :) |
Same error, when running your suggested command as root:
I don't know what is trying to
which already exists and is owned by root:root, with 700 mode. I'm running the playbook which invokes your role as a normal user with sudoer privileges, using |
i suppose the |
That's not the problem, aptly home exists and is writeable by aptly and root (of course):
I found something interesting in aptly home, looks like something created a directory named
|
Ok, that '$HOME' is weird... it looks like an escaping issue... |
As you can see in the playbook snippet I posted above, I specify:
and although I have Let me know if you have any ideas. I will now reset the aptly VM to the pre-provisioning snapshot I have, and then rerun the ansible playbook against it with |
Ah, yes, i did'nt realize you have changed the default config file path, that's why .aptly.conf is owned by root, you should not do that :)
And that's all :) |
Yeah, I saw the example in your README. Are you saying that your documented role variable If so, I can experiment with using the default instead, but I strongly recommend you either:
BTW, I reran my playbook on fresh Debian buster machine (with become: true) and reproduced the same problem. I will now rerun again using default aptly config location. |
Using you role's default for aptly config location, I still get the same error, so something else is going on:
There is no longer a $HOME file in aptly home, and here is the other pertinent info:
(Note that the aptly default location for this file is While I have your attention (thank you, BTW!) is there any support in your role for setting up https access and http forwarding using ssl cert files and an nginx reverse proxy? |
Well, what can i say... :) |
Btw, this role is atomic, and have the responsability to install and configure, and only install and configure aptly. The rest is your own responsibility :) |
The fact is there are some tests, and i can't see exactly what can differs from your own playbook... |
Below are the test results. It looks like apt is encountering some fetch errors. (i didn't see related errors when running my playbook, btw.)
|
Wtf... |
Remember, I'm running the playbook which invokes your role as a normal user named ansible that has passwordless sudoer privilege, and now I'm using How is this different from how you run the playbook successfully? What
|
The role (is supposed to) don't care about become method or become user. |
Thanks. I filed an issue with aptly repo. When creating that issue, I noticed that my aptly installation, done by this role, shows "unknown version":
I'm using all the defaults in your role. I see in your install task, that this is just installing aptly package. On my Debian Buster system, this version apt shows is: 1.3.0+ds1-2.2~deb10u1. Looks like 1.4.0 is the latest tag on the aptly git project. The 1.4.0 changelog doesn't seem to address this issue though. |
Well, you're installing aptly package from debian repositories, and not aptly ones. |
OK thanks. I also wanted to check with you if I am supposed to be creating the aptly user before invoking your role. Because, I am, using this play run before your role:
Regarding the dir named "$HOME" was created in /home/aptly:
I noticed that it appears to contain the expected contents in aptly user's home dir, i.e.
|
When running the aptly role I am getting "ERROR: mkdir $HOME: permission denied" in the
aptly repo list
andaptly repo create
calls made in tasks/repositories.yml.I am able to ssh into the controlled aptly server as the aptly user and run the same commands, without su, successfully. I believe the problem is the su commands used to execute aptly commands.
I am using
manala_aptly_user: aptly
and I get the same error with and without running the role withbecome: true
.There is no instruction in the role docs for what ansible user to run as, and there are runtime warnings about the su call:
How am I supposed to get past this user issue? Here is how my playbook invokes your role:
I'm using role version 2.0.2 and ansible version 2.9.10:
ansible 2.9.10
config file = /home/tblack/src/cm/ansible/projects/aptly/ansible.cfg
configured module search path = ['/home/tblack/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/tblack/.local/lib/python3.8/site-packages/ansible
executable location = /home/tblack/.local/bin/ansible
python version = 3.8.3 (default, Jun 30 2020, 11:18:52) [GCC 6.3.0 20170516]
Thanks for your time!
The text was updated successfully, but these errors were encountered: