Giter Site home page Giter Site logo

kewlfft / ansible-aur Goto Github PK

View Code? Open in Web Editor NEW
288.0 10.0 46.0 130 KB

Ansible module to manage packages from the AUR

License: GNU General Public License v3.0

Python 100.00%
ansible aur package-manager pacaur yay aur-helper archlinux helper aur-builder galaxy

ansible-aur's People

Contributors

brettinternet avatar chpatton013 avatar ckotte avatar gliech avatar gotmax23 avatar grcancelliere avatar hummeltech avatar hvariant avatar jp1995 avatar juergenhoetzel avatar kewlfft avatar lorenzobettini avatar neilmunday avatar pallxk avatar panchoh avatar terseus avatar visibilityspots avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-aur's Issues

Using this module as a backend for ansible.builtin.package

Is it possible to use this module as a backend for the package core ansible module?

This modules manages packages on a target without specifying a package manager module (like ansible.builtin.yum, ansible.builtin.apt, โ€ฆ). It is convenient to use in an heterogeneous environment of machines without having to create a specific task for each package manager.

Or is there perhaps something that limits the package module from using third party modues as a backend?

make --aur default for aurman, pacaur, trizen

Since ansible already has a default module for pacman I was wondering if it would be an idea to make aurman. pacaur and trizen using the AUR repository only for updates and installations?

Reinstall doesn't report change

- name: Test install
  kewlfft.aur.aur:
    name: units
    state: present
    use: yay
  become: yes
  become_user: aur_builder
  
- name: Remove test package
  community.general.pacman:
    name: units
    state: removed
    remove_nosave: true
    
- name: Test reinstall
  kewlfft.aur.aur:
    name: units
    state: present
    use: yay
  become: yes
  become_user: aur_builder

produces:

TASK [test : Test install] ***************************************************************
changed: [iota]

TASK [test : Remove test package] ********************************************************
--- before
+++ after
@@ -1 +0,0 @@
-units-2.22-2

changed: [iota]

TASK [test : Test reinstall] *************************************************************
ok: [iota]                                                                                               

wheras expected behaviour would be:

TASK [test : Test reinstall] *************************************************************
changed: [iota]                                                                                         

I figured maybe this had to do with cached packages, but none of the package I tested with (grafana-bin, units) cached anything in /var/cache/pacman/pkg or ~/.cache/yay/ and reinstall is always recompiling too.

Manually running pacman -Rdd or pacman -Rns doesn't work either.

The community.general.pacman module does have this expected behaviour on reinstall.

Not a pacman / arch expert by any means, but Is there something specific I'm supposed to do here to solve this, or is this a bug?

Add ability to force rebuild packages

Sometimes it is necessary to rebuild packages, because a dependency update resulted in a new ABI (.so bumps, python upgrades, etc.). The general expectation is that the AUR maintainers don't need to bump pkgrel for updated dependencies, but rather the AUR users are supposed to rebuild their packages. The problem is that this ansible role doesn't allow to force rebuild a package if the version hasn't changed requiring either manual intervention, or explicit removal and reinstall.

An option to rebuild the AUR package regardless of current installed version would be appreciated.

My specific usecase is for the recent python 3.8 -> 3.9 update where I had to rebuild my AUR python packages.

is ansible-aur-git up to date?

Hi @kewlfft and @panchoh just thought I'd you both about this because of issue [#5]

I was trying to simplify some ansible workfIow and thought it might be easier and possibly more stable to install ansible-aur via pacman instead of cloning the git repo and I wondered if the ansible-aur-git is up to date? I'm assuming not as the last updated date is quite a while ago... if not what's the advice on requesting it to be updated please?

Also, if you feel it not necessary and that cloning is just as easy and stable then do let me know - I'd happily use either route it's just the readme in this project presents both options and I'm unsure of best practices (I'm just getting to grips with arch and ansible)

Installing an already installed package with paru gives an error

Hello,

Running the following play gives an error that there is nothing to do, this errors the play and stops the playbook. This should be ok and ignored.

- name: install paru
  aur:
    name:
      - paru-bin # aur helper
    state: latest
fatal: [arch_vm]: FAILED! => {"changed": false, "cmd": "env LC_ALL=C paru -S --noconfirm --needed --cleanafter paru-bin", "msg": ":: paru-bin-1.3.0-1 is up to date -- skipping", "rc": 1, "stderr": ":: paru-bin-1.3.0-1 is up to date -- skipping\n", "stderr_lines": [":: paru-bin-1.3.0-1 is up to date -- skipping"], "stdout": ":: Resolving dependencies...\n there is nothing to do\n", "stdout_lines": [":: Resolving dependencies...", " there is nothing to do"]}

Link name aur-ansible-git wrong

In the README.md the link to AUR is named 'aur-ansible-git '. The link works but the package is actually called ansible-aur-git.

Move to collection

Hi,

Would you consider moving the aur module to a collection? Collections are now upstream's preferred method of distributing Ansible content, especially Python-based content. This would also make it easier to utilize the aur module within other Ansible content whether it's a standalone role or a collection.

For standalone roles, this would make it possible to utilize the module without creating a hard dependency on this role. Currently, the only method for calling the aur module within a role is by adding kewlfft.aur to dependencies: in meta/main.yml. This has the potentially unwanted side effect of automatically installing this role.

Currently, it is possible to use the aur module within roles inside collections with the same method: adding kewlfft.aur to dependencies: in the role's meta/main.yml. It is also necessary to add ansible.legacy to the collections: tag in the roles's meta/main.yml. See this section of the Ansible documentation for more info. Notably, this does not automatically install this role because it is not possible for roles in collections to have a hard dependency on standalone roles. It is also possible with the current implementation to use the aur module in a collection by installing the ansible-aur-git AUR package or by manually copying aur.py to ~/.ansible/plugins/modules/ as described in the README.

If you moved this module to a collection, it would be possible for other collections to depend on that collection, if desired. Otherwise, as long as the user installs the collection on their machine, they can use kewlfft.aur.aur (for example) in any playbook or role without needing to specify anything in meta/main.yml (for a role) or under roles: (in a playbook).

Thanks,
Maxwell

Please add documentation to aur.py

The documentation only exists on README.md.

When I try:

$ ansible-doc aur
ERROR! module aur missing documentation (or could not parse documentation): Parsing produced an empty object.

I use this a lot from my editor, to check the params of the modules without having to fire up a browser...

Thanks a bunch!

BTW, If you are busy with other stuff, I could try and do it and drop you a PR, but not immediately.

Support Python 2 - 'module' object has no attribute 'TemporaryDirectory

I am using the install trizen example in a role called aur_builder here:

# AUR builder related tasks
- name: Create aur_builder user
  user:
    name: aur_builder
    group: wheel
- name: Allow aur_builder to run pacman as root
  lineinfile:
    path: /etc/sudoers.d/11-install-aur_builder
    line: 'aur_builder ALL=(ALL) NOPASSWD: /usr/bin/pacman'
    create: yes
    validate: 'visudo -cf %s'

# Install trizen using makepkg, skip if trizen is already installed
- name: Install trizen
  aur: name=trizen use=makepkg skip_installed=true
  become: yes
  become_user: aur_builder

and I'm getting the following error.

TASK [aur_builder : Install trizen] ********************************************
fatal: [default]: FAILED! => {"changed": false, "module_stderr": "Shared connection to 127.0.0.1 closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/tmp/ansible_UQa5Xn/ansible_module_aur.py\", line 255, in <module>\r\n    main()\r\n  File \"/tmp/ansible_UQa5Xn/ansible_module_aur.py\", line 251, in main\r\n    install_packages(module, params['name'], use, params['skip_installed'], params['aur_only'])\r\n  File \"/tmp/ansible_UQa5Xn/ansible_module_aur.py\", line 180, in install_packages\r\n    rc, out, err = install_with_makepkg(module, package)\r\n  File \"/tmp/ansible_UQa5Xn/ansible_module_aur.py\", line 135, in install_with_makepkg\r\n    with tempfile.TemporaryDirectory() as tmpdir:\r\nAttributeError: 'module' object has no attribute 'TemporaryDirectory'\r\n", "msg": "MODULE FAILURE", "rc": 1}

Am I missing something or is this a new bug?

My version of ansible is:

ansible --version
ansible 2.6.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/david/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.6.6 (default, Jun 27 2018, 13:11:40) [GCC 8.1.1 20180531]

Error in check mode using upgrade:yes

with this playbook:


  • hosts: localhost
    tasks:
    • name: Update archlinux
      aur:
      upgrade: yes
      state: latest

I get this error in check mode (ansible-playbook -C):

The full traceback is:
Traceback (most recent call last):
File "/home/ellton/.ansible/tmp/ansible-tmp-1591791499.424747-1888790-158389577016436/AnsiballZ_aur.py", line 102, in
_ansiballz_main()
File "/home/ellton/.ansible/tmp/ansible-tmp-1591791499.424747-1888790-158389577016436/AnsiballZ_aur.py", line 94, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/home/ellton/.ansible/tmp/ansible-tmp-1591791499.424747-1888790-158389577016436/AnsiballZ_aur.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible.modules.aur', init_globals=None, run_name='main', alter_sys=True)
File "/usr/lib/python3.8/runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 313, in
File "/tmp/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 309, in main
File "/tmp/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 300, in apply_module
File "/tmp/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 126, in check_packages
TypeError: 'NoneType' object is not iterable
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/home/ellton/.ansible/tmp/ansible-tmp-1591791499.424747-1888790-158389577016436/AnsiballZ_aur.py", line 102, in \n _ansiballz_main()\n File "/hom
e/ellton/.ansible/tmp/ansible-tmp-1591791499.424747-1888790-158389577016436/AnsiballZ_aur.py", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/home/ellton/.ansible/tmp/ansibl
e-tmp-1591791499.424747-1888790-158389577016436/AnsiballZ_aur.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.aur', init_globals=None, run_name='main', alter_sys=True)\n File "/usr/lib/pyt
hon3.8/runpy.py", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globa
ls,\n File "/usr/lib/python3.8/runpy.py", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 313, in \n File "/tmp
/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 309, in main\n File "/tmp/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 300, in apply_module\n File
"/tmp/ansible_aur_payload_vovp83ji/ansible_aur_payload.zip/ansible/modules/aur.py", line 126, in check_packages\nTypeError: 'NoneType' object is not iterable\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

Upgrade cannot be used with this option. - maybe my fault ...

Hello,
I am new in ansible, but want to use your role.
I have following playbook:

---
- name: Update the AUR
  hosts: localhost
  become: yes
  become_user: aur_builder

  roles:
    - kewlfft.aur

  tasks:
    - aur: upgrade=yes```

And the error is: Upgrade cannot be used with this option.
But if I have a look in your aur.py:

if params['upgrade'] and (params['name'] or params['skip_installed'] or use == 'makepkg'): module.fail_json(msg="Upgrade cannot be used with this option.")

It should be work as you can see the variable:

"module_args": {
        "aur_only": false,
        "ignore_arch": false,
        "name": null,
        "skip_installed": false,
        "skip_pgp_check": false,
        "upgrade": true,
        "use": "auto"

Thanks for help and greets,
herrmie

my ansible run stalls on aur tasks

(I'm not sure if this is an ansible-aur issue, an ansible issue, or a my-laptop issue)

I'm in the process of writing up ansible configs to have consistent working enviromnents across my system. This works as expected on a more newly-provisioned system; but running the same configs on my arch laptop makes ansible stall indefinitely on aur-related tasks.

I'm not sure where I'm holding it wrong; but I'm all out of useful diagnostics too. Ansible just... sits there. How can I determine where things are going wrong?

Upgrading packages to latest with paru failes because of "--needed" parameter

When currently trying to upgrade my packages with:

- name: Install aur workstation packages
  kewlfft.aur.aur:
    use: paru
    state: latest
    name: "{{ aur_packages.workstation }}"

It fails with (shortened):

    "changed": false,
    "cmd": "env LC_ALL=C LANGUAGE=C paru -S --noconfirm --needed --cleanafter visual-studio-code-bin",
    "msg": "    code.desktop ... Passed\n    code-url-handler.desktop ... Passed\n    visual-studio-code-workspace.xml ... Passed\n    visual-studio-code-bin.sh ... Passed\n    code_x64_1.85.1.tar.gz ... Passed\n    code.desktop ... Passed\n    code-url-handler.desktop ... Passed\n    visual-studio-code-workspace.xml ... Passed\n    visual-studio-code-bin.sh ... Passed\n    code_x64_1.85.1.tar.gz ... Passed\nerror: '/home/chris/.cache/paru/clone/visual-studio-code-bin/visual-studio-code-bin-1.85.1-1-x86_64.pkg.tar.zst': could not find or read package",
    "rc": 1,
    "stderr": "    code.desktop ... Passed\n    code-url-handler.desktop ... Passed\n    visual-studio-code-workspace.xml ... Passed\n    visual-studio-code-bin.sh ... Passed\n    code_x64_1.85.1.tar.gz ... Passed\n    code.desktop ... Passed\n    code-url-handler.desktop ... Passed\n    visual-studio-code-workspace.xml ... Passed\n    visual-studio-code-bin.sh ... Passed\n    code_x64_1.85.1.tar.gz ... Passed\nerror: '/home/chris/.cache/paru/clone/visual-studio-code-bin/visual-studio-code-bin-1.85.1-1-x86_64.pkg.tar.zst': could not find or read package\n",
    "stderr_lines": [
        "    code.desktop ... Passed",
        "    code-url-handler.desktop ... Passed",
        "    visual-studio-code-workspace.xml ... Passed",
        "    visual-studio-code-bin.sh ... Passed",
        "    code_x64_1.85.1.tar.gz ... Passed",
        "    code.desktop ... Passed",
        "    code-url-handler.desktop ... Passed",
        "    visual-studio-code-workspace.xml ... Passed",
        "    visual-studio-code-bin.sh ... Passed",
        "    code_x64_1.85.1.tar.gz ... Passed",
        "error: '/home/chris/.cache/paru/clone/visual-studio-code-bin/visual-studio-code-bin-1.85.1-1-x86_64.pkg.tar.zst': could not find or read package"
    ],

The same happens on the console.

Omitting the --needed parameter fixes the command and everything works as expected:

env LC_ALL=C LANGUAGE=C paru -S --noconfirm --cleanafter visual-studio-code-bin

Ansible 6.0 incompatibility

After upgrading to the latest ansible version on Archlinux the following stopped working:
ansible-galaxy collection install kewlfft.aur

Output:
Error! failed to deploy packaging, check that a supported version is installed

The issue is reproducible on a fresh ArchLinux installation with the latest ansible installed (6.0.0.0-1).

Expected:
Install the collection

pkglist support?

Great work; does this module support reading from a package list like so: {helper} -S - < pkglist.txt;

update_cache is an unsupported parameter

When using the update_cache parameter as described in the README, I get the following error from Ansible:

fatal: [hostname]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (kewlfft.aur.aur) module: update_cache. Supported parameters include: use, extra_args, name, upgrade, ignore_arch, state, skip_pgp_check, aur_only, local_pkgbuild."}

I've tested with the version installed by ansible-galaxy and the one from the AUR and both have the same issue. It looks like update_cache was added 13 days ago and the last release was on the 4th September so I'm guessing the README is just ahead of the current release?

ignore_errors

AUR package install fails frequently, i want to be able to continue the loop if a package fails to install.

Using ignore_errors at the task level make the task to skip if an error occurs, but every aur packages after the failling one are skipped.
Is there a way to add an ignore_errors option ?

aurman fails if you have not read archlinux.org news

SUMMARY

The aurman AUR-helper has recently been updated with a feature that displays news articles from archlinux.org and requires the user to confirm that they have read them. This causes the aur module to fail on systems where aurman was not executed interactively before using it as part of the module, or after a new article was posted on archlinux.org. Also this confirmation does not get suppressed by using the '--noconfirm' option. Thankfully a '--skip_news' option exists in aurman, that can be used instead.

STEPS TO REPRODUCE

On a fresh install (like an 'archlinux/archlinux' Vagrant Box) run:

- name: Install aurman
  aur:
    name: aurman
    use: makepkg
    skip_pgp_check: yes

- name: Install aurman again
  aur:
    name: aurman
    use: aurman
    skip_pgp_check: yes
EXPECTED RESULTS

The first use of the aur module should install aurman and report the status 'changed'.
The second use of the aur module should do nothing and report the status 'ok'.

ACTUAL RESULTS

The second use of the aur module fails because it requires user input.

TASK [Install aurman] **********************************************************
changed: [aur-test]

TASK [Install aurman again] ****************************************************
fatal: [aur-test]: FAILED! => {"changed": false, "cmd": "env LC_ALL=C aurman -S --noconfirm --noedit --needed aurman", "msg": "2018-07-17 08:49:40,924 - main - main - ERROR - \nTraceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 947, in main\n    process(argv[1:])\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 529, in process\n    show_unread_news()\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 369, in show_unread_news\n    ), False, True):\n  File \"/usr/lib/python3.6/site-packages/aurman/utilities.py\", line 239, in ask_user\n    old_settings = termios.tcgetattr(fd)\ntermios.error: (25, 'Inappropriate ioctl for device')", "rc": 1, "stderr": "2018-07-17 08:49:40,924 - main - main - ERROR - \nTraceback (most recent call last):\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 947, in main\n    process(argv[1:])\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 529, in process\n    show_unread_news()\n  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 369, in show_unread_news\n    ), False, True):\n  File \"/usr/lib/python3.6/site-packages/aurman/utilities.py\", line 239, in ask_user\n    old_settings = termios.tcgetattr(fd)\ntermios.error: (25, 'Inappropriate ioctl for device')\n", "stderr_lines": ["2018-07-17 08:49:40,924 - main - main - ERROR - ", "Traceback (most recent call last):", "  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 947, in main", "    process(argv[1:])", "  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 529, in process", "    show_unread_news()", "  File \"/usr/lib/python3.6/site-packages/aurman/main.py\", line 369, in show_unread_news", "    ), False, True):", "  File \"/usr/lib/python3.6/site-packages/aurman/utilities.py\", line 239, in ask_user", "    old_settings = termios.tcgetattr(fd)", "termios.error: (25, 'Inappropriate ioctl for device')"], "stdout": "\n:: Phasing out i686 support [Wed, 25 Jan 2017 18:23:33 +0000]\nDue to the decreasing popularity of i686 among the developers and the\ncommunity, we have decided to phase out the support of this architecture.\nThe decision means that February ISO will be the last that allows to\ninstall 32 bit Arch Linux. The next 9 months are deprecation period,\nduring which i686 will be still receiving upgraded packages. Starting\nfrom November 2017, packaging and repository tools will no longer\nrequire that from maintainers, effectively making i686 unsupported.\nHowever, as there is still some interest in keeping i686 alive, we would\nlike to encourage the community to make it happen with our guidance. The\narch-ports mailing list and #archlinux-ports IRC channel on Freenode\nwill be used for further coordination.\nThe [multilib] repository will not be affected by this change.\n\n:: mesa  with libglvnd support is now in testing [Mon, 27 Feb 2017 20:15:02 +0000]\nmesa-17.0.0-3 can now be installed side-by-side with nvidia-378.13 driver without any libgl/libglx hacks, and with the help of Fedora and upstream xorg-server patches.\n\n\nFirst step was to remove the libglx symlinks with xorg-server-1.19.1-3 and associated mesa/nvidia drivers through the removal of various libgl packages. It was a tough moment because it was breaking optimus system, xorg-server configuration needs manual updating.\n\n\nThe second step is now here, with an updated 10-nvidia-drm-outputclass.conf  file that should help to have an \"out-of-the-box\" working xorg-server experience with optimus system.\n\n\nPlease test this extensively and post your feedback in this forum thread or in our bugtracker.\n\n:: ca-certificates-utils 20170307-1 upgrade requires manual intervention [Wed, 15 Mar 2017 21:27:54 +0000]\nThe upgrade to ca-certificates-utils 20170307-1 requires manual intervention because a symlink which used to be generated post-install has been moved into the package proper.\nAs deleting the symlink may leave you unable to download packages, perform this upgrade in three steps:\n# pacman -Syuw                           # download packages\n# rm /etc/ssl/certs/ca-certificates.crt  # remove conflicting file\n# pacman -Su                             # perform upgrade\n\n\n:: Deprecation of ABS tool and rsync endpoint [Mon, 15 May 2017 10:55:50 +0000]\nDue to high maintenance cost of scripts related to the Arch Build\nSystem, we have decided to deprecate the abs tool and thus rsync\nas a way of obtaining PKGBUILDs.\nThe asp tool, available in [extra], provides similar functionality to\nabs.  asp export pkgname can be used as direct alternative; more\ninformation about its usage can be found in the documentation.\nAdditionally Subversion sparse checkouts, as described here, can\nbe used to achieve a similar effect.  For fetching all PKGBUILDs, the\nbest way is cloning the svntogit mirrors.\nWhile the extra/abs package has been already dropped, the rsync\nendpoint (rsync://rsync.archlinux.org/abs) will be disabled by the end\nof the month.\n\n:: Perl library path change [Sat, 02 Sep 2017 11:44:22 +0000]\nThe perl package now uses a versioned path for compiled modules. This means\nthat modules built for a non-matching perl version will not be loaded any more\nand must be rebuilt. \nA pacman hook warns about affected modules during the upgrade by showing output\nlike this:\nWARNING: '/usr/lib/perl5/vendor_perl' contains data from at least 143 packages which will NOT be used by the installed perl interpreter.\n -&gt; Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/vendor_perl'\n\nYou must rebuild all affected packages against the new perl package before you\ncan use them again. The change also affects modules installed directly via\nCPAN. Rebuilding will also be necessary again with future major perl updates\nlike 5.28 and 5.30.\nPlease note that rebuilding was already required for major updates prior to\nthis change, however now perl will no longer try to load the modules and then fail in strange ways.\nIf the build system of some software does not detect the change automatically,\nyou can use perl -V:vendorarch in your PKGBUILD to query perl for the\ncorrect path. There is also sitearch for software that is not packaged with\npacman.\n\n:: The end of i686 support [Wed, 08 Nov 2017 13:39:10 +0000]\nFollowing 9 months of deprecation period, support for the i686\narchitecture effectively ends today. By the end of November, i686\npackages will be removed from our mirrors and later from the packages\narchive. The [multilib] repository is not affected.\nFor users unable to upgrade their hardware to x86_64, an alternative is\na community maintained fork named Arch Linux 32. See their website\nfor details on migrating existing installations.\n\n:: zita-resampler 1.6.0-1 -> 2 update requires manual intervention [Thu, 22 Feb 2018 07:57:11 +0000]\nThe zita-resampler 1.6.0-1 package was missing a library symlink that has been readded in 1.6.0-2. If you installed 1.6.0-1, ldconfig would have created this symlink at install time, and it will conflict with the one included in 1.6.0-2. In that case, remove /usr/lib/libzita-resampler.so.1 manually before updating.\n\n:: glibc 2.27-2 and pam 1.3.0-2 may require manual intervention [Fri, 20 Apr 2018 07:45:46 +0000]\nThe new version of glibc removes support for NIS and NIS+. The default\n/etc/nsswitch.conf file provided by filesystem package already\nreflects this change. Please make sure to merge pacnew file if it exists\nprior to upgrade.\nNIS functionality can still be enabled by installing libnss_nis\npackage. There is no replacement for NIS+ in the official repositories.\npam 1.3.0-2 no longer ships pam_unix2 module and pam_unix_*.so\ncompatibility symlinks. Before upgrading, review PAM configuration files\nin the /etc/pam.d directory and replace removed modules with\npam_unix.so. Users of pam_unix2 should also reset their passwords\nafter such change. Defaults provided by pambase package do not need\nany modifications.\n\n:: js52 52.7.3-2 upgrade requires intervention [Fri, 04 May 2018 20:27:33 +0000]\nDue to the SONAME of /usr/lib/libmozjs-52.so not matching its file name, ldconfig created an untracked file /usr/lib/libmozjs-52.so.0. This is now fixed and both files are present in the package.\nTo pass the upgrade, remove /usr/lib/libmozjs-52.so.0 prior to upgrading.\n\n:: libutf8proc>=2.1.1-3 update requires manual intervention [Sat, 14 Jul 2018 16:55:19 +0000]\nThe libutf8proc package prior to version 2.1.1-3 had an incorrect soname link. This has been fixed in 2.1.1-3, so the upgrade will need to overwrite the untracked soname link created by ldconfig. If you get an error\nlibutf8proc: /usr/lib/libutf8proc.so.2 exists in filesystem\nwhen updating, use\npacman -Suy --overwrite usr/lib/libutf8proc.so.2\nto perform the upgrade.\n\n?? Have you read the 10 unread article(s) from archlinux.org? N/y: ", "stdout_lines": ["", ":: Phasing out i686 support [Wed, 25 Jan 2017 18:23:33 +0000]", "Due to the decreasing popularity of i686 among the developers and the", "community, we have decided to phase out the support of this architecture.", "The decision means that February ISO will be the last that allows to", "install 32 bit Arch Linux. The next 9 months are deprecation period,", "during which i686 will be still receiving upgraded packages. Starting", "from November 2017, packaging and repository tools will no longer", "require that from maintainers, effectively making i686 unsupported.", "However, as there is still some interest in keeping i686 alive, we would", "like to encourage the community to make it happen with our guidance. The", "arch-ports mailing list and #archlinux-ports IRC channel on Freenode", "will be used for further coordination.", "The [multilib] repository will not be affected by this change.", "", ":: mesa  with libglvnd support is now in testing [Mon, 27 Feb 2017 20:15:02 +0000]", "mesa-17.0.0-3 can now be installed side-by-side with nvidia-378.13 driver without any libgl/libglx hacks, and with the help of Fedora and upstream xorg-server patches.", "", "", "First step was to remove the libglx symlinks with xorg-server-1.19.1-3 and associated mesa/nvidia drivers through the removal of various libgl packages. It was a tough moment because it was breaking optimus system, xorg-server configuration needs manual updating.", "", "", "The second step is now here, with an updated 10-nvidia-drm-outputclass.conf  file that should help to have an \"out-of-the-box\" working xorg-server experience with optimus system.", "", "", "Please test this extensively and post your feedback in this forum thread or in our bugtracker.", "", ":: ca-certificates-utils 20170307-1 upgrade requires manual intervention [Wed, 15 Mar 2017 21:27:54 +0000]", "The upgrade to ca-certificates-utils 20170307-1 requires manual intervention because a symlink which used to be generated post-install has been moved into the package proper.", "As deleting the symlink may leave you unable to download packages, perform this upgrade in three steps:", "# pacman -Syuw                           # download packages", "# rm /etc/ssl/certs/ca-certificates.crt  # remove conflicting file", "# pacman -Su                             # perform upgrade", "", "", ":: Deprecation of ABS tool and rsync endpoint [Mon, 15 May 2017 10:55:50 +0000]", "Due to high maintenance cost of scripts related to the Arch Build", "System, we have decided to deprecate the abs tool and thus rsync", "as a way of obtaining PKGBUILDs.", "The asp tool, available in [extra], provides similar functionality to", "abs.  asp export pkgname can be used as direct alternative; more", "information about its usage can be found in the documentation.", "Additionally Subversion sparse checkouts, as described here, can", "be used to achieve a similar effect.  For fetching all PKGBUILDs, the", "best way is cloning the svntogit mirrors.", "While the extra/abs package has been already dropped, the rsync", "endpoint (rsync://rsync.archlinux.org/abs) will be disabled by the end", "of the month.", "", ":: Perl library path change [Sat, 02 Sep 2017 11:44:22 +0000]", "The perl package now uses a versioned path for compiled modules. This means", "that modules built for a non-matching perl version will not be loaded any more", "and must be rebuilt. ", "A pacman hook warns about affected modules during the upgrade by showing output", "like this:", "WARNING: '/usr/lib/perl5/vendor_perl' contains data from at least 143 packages which will NOT be used by the installed perl interpreter.", " -&gt; Run the following command to get a list of affected packages: pacman -Qqo '/usr/lib/perl5/vendor_perl'", "", "You must rebuild all affected packages against the new perl package before you", "can use them again. The change also affects modules installed directly via", "CPAN. Rebuilding will also be necessary again with future major perl updates", "like 5.28 and 5.30.", "Please note that rebuilding was already required for major updates prior to", "this change, however now perl will no longer try to load the modules and then fail in strange ways.", "If the build system of some software does not detect the change automatically,", "you can use perl -V:vendorarch in your PKGBUILD to query perl for the", "correct path. There is also sitearch for software that is not packaged with", "pacman.", "", ":: The end of i686 support [Wed, 08 Nov 2017 13:39:10 +0000]", "Following 9 months of deprecation period, support for the i686", "architecture effectively ends today. By the end of November, i686", "packages will be removed from our mirrors and later from the packages", "archive. The [multilib] repository is not affected.", "For users unable to upgrade their hardware to x86_64, an alternative is", "a community maintained fork named Arch Linux 32. See their website", "for details on migrating existing installations.", "", ":: zita-resampler 1.6.0-1 -> 2 update requires manual intervention [Thu, 22 Feb 2018 07:57:11 +0000]", "The zita-resampler 1.6.0-1 package was missing a library symlink that has been readded in 1.6.0-2. If you installed 1.6.0-1, ldconfig would have created this symlink at install time, and it will conflict with the one included in 1.6.0-2. In that case, remove /usr/lib/libzita-resampler.so.1 manually before updating.", "", ":: glibc 2.27-2 and pam 1.3.0-2 may require manual intervention [Fri, 20 Apr 2018 07:45:46 +0000]", "The new version of glibc removes support for NIS and NIS+. The default", "/etc/nsswitch.conf file provided by filesystem package already", "reflects this change. Please make sure to merge pacnew file if it exists", "prior to upgrade.", "NIS functionality can still be enabled by installing libnss_nis", "package. There is no replacement for NIS+ in the official repositories.", "pam 1.3.0-2 no longer ships pam_unix2 module and pam_unix_*.so", "compatibility symlinks. Before upgrading, review PAM configuration files", "in the /etc/pam.d directory and replace removed modules with", "pam_unix.so. Users of pam_unix2 should also reset their passwords", "after such change. Defaults provided by pambase package do not need", "any modifications.", "", ":: js52 52.7.3-2 upgrade requires intervention [Fri, 04 May 2018 20:27:33 +0000]", "Due to the SONAME of /usr/lib/libmozjs-52.so not matching its file name, ldconfig created an untracked file /usr/lib/libmozjs-52.so.0. This is now fixed and both files are present in the package.", "To pass the upgrade, remove /usr/lib/libmozjs-52.so.0 prior to upgrading.", "", ":: libutf8proc>=2.1.1-3 update requires manual intervention [Sat, 14 Jul 2018 16:55:19 +0000]", "The libutf8proc package prior to version 2.1.1-3 had an incorrect soname link. This has been fixed in 2.1.1-3, so the upgrade will need to overwrite the untracked soname link created by ldconfig. If you get an error", "libutf8proc: /usr/lib/libutf8proc.so.2 exists in filesystem", "when updating, use", "pacman -Suy --overwrite usr/lib/libutf8proc.so.2", "to perform the upgrade.", "", "?? Have you read the 10 unread article(s) from archlinux.org? N/y: "]}
	to retry, use: --limit @/mnt/work/aur-bootstrap/vagrant/playbook.retry

PLAY RECAP *********************************************************************
aur-test                   : ok=0    changed=1    unreachable=0    failed=1

Deprecation warning for `CmdMixin` (used in `CmdModuleHelper` and `CmdStateModuleHelper`)

I receive the following warning when using this module:

[DEPRECATION WARNING]: The CmdMixin used in classes CmdModuleHelper and CmdStateModuleHelper is being deprecated. Modules
should use community.general.plugins.module_utils.cmd_runner.CmdRunner instead. This feature will be removed from
community.general in version 8.0.0. Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.

Wrap the module in a role

What about wrapping this module into a role and publish it to ansible galaxy? So that end users or other role developers can easily consume it.

See https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html#embedding-modules-and-plugins-in-roles

For end users, they can do something like:

# playbook.yml
- hosts: localhost
  roles:
  - name: kewlfft.aur
  tasks:
  - aur:
      name: xxx

For role developers:

# meta/main.yml
dependencies:
- kewlfft.aur
# tasks/main.yml
- aur:
    name: xxx

Add Paru as a helper

New cool kid on the block, should be the same flags as yay.
I can do a PR for it if you want?

btw thanks for that project, really helpful.

Role name kewlfft.aur does not match ``^[a-z][a-z0-9_]+$`` pattern

When running ansible-lint against my playbook that relies on the role kewlfft.aur installed from ansible galaxy, I get this error:

$ ansible-lint ec2.yaml
[106] Role name kewlfft.aur does not match ``^[a-z][a-z0-9_]+$`` pattern
../../../.ansible/roles/kewlfft.aur/meta/main.yml:1
galaxy_info:

Should we rename this role so it passes ansible-lint?

Option to show build progress

I'm running 'ansible-aur' to rebuild VM images, and I'm noticing that sometimes it looks like the install hangs (which could be just taking long to compile), but I have no visibility of what's going in the background.

Is there an option to show the build/install progress? I have tried ansible-playbook -vvv but that does not show build progress.

Thanks!

Setting `name` to an empty list

Hi

When you specify an empty list to name, then a error is raised. E.g.:

---

- name: "install aur packages"
  hosts: "localhost"
  connection: "local"
  become: True

  vars:
    # aur_pkgs: []    # This fails with an explicit fail message
    aur_pkgs:      # This raises an exception

roles:
    - name: "Install AUR packages"
      kewlfft.aur.aur:
        name: "{{ aur_pkgs }}"
        use: "yay"
        state: "present"
      become_user: "aur_builder"

Obviously, not a huge issue, but this behavior is different from what e.g. ansible.builtin.package does. so i was a bit surprised by it.

FWIW, my use case is having a playbook template which contains something like this:

  vars:
    remove_pkgs:
    pkgs:
    aur_pkgs:

  tasks:
    - name: "Uninstall packages"
      ansible.builtin.package:
        name: "{{ remove_pkgs }}"
        state: "absent"

    - name: "Install packages"
      ansible.builtin.package:
        name: "{{ pkgs }}"
        state: "present"

    - name: "Install AUR packages"
      kewlfft.aur.aur:
        name: "{{ aur_pkgs }}"
        use: "yay"
        state: "present"
      become_user: "aur_builder"

and where I fill in the variables with values as necessary. As it is, I need to comment out the AUR stuff. Again, not a huge deal, but I don't really see why the playbook should fail.

I could make a PR if you agree with this behavior change

Related commit: 95aa8f3

Installation with multiple options

I want to install package with yay.
In the particular case I have issues to install spotify.

How can I stick to specific package non-interactive?

A good case would be spotify
1 aur/spotify 1:1.1.10.546-4 (+1953 36.50%) (Installed) A proprietary music streaming service

Add ability to pass arbitrary arguments on install and upgrade

I've seen some AUR packages do weird things with their prepare hooks, which require some TTY interaction to resolve. For this packages I generally just want to run makepkg with the --noprepare flag. Various AUR-helpers have options to pass arbitrary flags onto makepkg (such as yay, which uses --mflags). It would be nice to be able to pass flags to the helper directly, or to makepkg using whichever mechanism the helper provides.

So I guess I'm asking for one (or both, preferably) of the following features:

  • An additional argument use_args that takes a list of string arguments to pass to the helper in-use. This should only be allowed when use is set to something other than auto.
  • An additional argument makepkg_args that takes a list of string arguments to pass to makepkg using whichever mechanism the active helper supports. This should be incompatible with helpers that don't support this mechanism.

If you're amicable to either of these features, I would be happy to implement them. Just let me know what your thoughts are.

getting temporary directory problem

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

Add ability to remove packages, with state: absent

This is a really use full module, after they removed the yay builtin module.

One thing I have been missing is state: absent. To remove package with all of the supported install methods.

The only way that it might be possible with is the extra_args option. (haven't tested).

Uninstallation of Packages

I think a feature to be able to uninstall packages would be great, currently I am having to use a command or shell to do so.

With that said, I now have a heavy requirement of ansible-aur, so I would be interested in contributing if it is possible.

Add noconfirm and noedit

Hey

I am having some problems setting --noconfirm and --noedit when I want to perform a system update. Is it not just

    extra_args: 
      --noconfirm 
      --noedit

I just started using Ansible and am still learning it.

Thanks
Dan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.