Closed panchoh closed 6 years ago
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
?
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."
}
$
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,