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

Please note I've created an AUR package for ansible-aur #5

Closed
panchoh opened this issue May 23, 2018 · 2 comments
Closed

Please note I've created an AUR package for ansible-aur #5

panchoh opened this issue May 23, 2018 · 2 comments

Comments

@panchoh
Copy link
Contributor

panchoh commented May 23, 2018

Hi!

I've created an AUR package for ansible-aur.

Let me know if you want to co-maintain it.

Also, it could be worth mentioning in the arch wiki.

Happy hacking,

@kewlfft
Copy link
Owner

kewlfft commented May 23, 2018

thanks there is something wrong with your pkgver() though, it should no show master in the version
what about:
git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'

Also is /usr/share/ansible/plugins/modules/ standard? what about /usr/share/ansible/library ?

@panchoh
Copy link
Contributor Author

panchoh commented May 23, 2018

Thanks for the heads up!
I've fixed pkgver() following your suggestion; I had to add --tags, though, otherwise it fails:

$ git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
  
  
fatal: No annotated tags can describe '39541acc7867f9da8b944e5e27ebd24352a9f673'.
However, there were unannotated tags: try --tags.

Regarding the path to the modules, I just followed what the manpage says:

$ man ansible
...
       -M, --module-path
           prepend colon-separated path(s) to module library (default=[u'/home/jenkins/.ansible/plugins/modules',
           u'/usr/share/ansible/plugins/modules'])

If I place the module under /usr/share/ansible/library it fails horribly with a

$ ansible -vvvv -m aur localhost
ansible 2.5.3
  config file = /home/pancho/.ansible.cfg
  configured module search path = ['/home/pancho/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /bin/ansible
  python version = 3.6.5 (default, May 11 2018, 04:00:52) [GCC 8.1.0]
Using /home/pancho/.ansible.cfg as config file
setting up inventory plugins
 [WARNING]: Unable to parse /home/pancho/hosts as an inventory source

 [WARNING]: No inventory was parsed, only implicit localhost is available

 [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'

Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python3.6/site-packages/ansible/plugins/callback/minimal.py
META: ran handlers
localhost | FAILED! => {
    "msg": "The module aur was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git pull --rebase' to correct this problem."
}
$

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

2 participants