I’ve started looking at Ansible to manage all the laptops, VMs, SBCs that I have running Arch Got the ol’ pacman installs / updates working fine, but I’m having some problems understanding how to setup AUR to install some of those packages.

Main issue is where Ansible is basically doing everything as root, and AUR helpers don’t want to run as root, so ok, create a 2nd non-root user first…

But even installing an AUR helper (yay) brings problems:

I can setup a folder in /tmp/aur , I can git clone the yay package, but then I have no idea how to run makepkg or then yay as that non-root user.

Does anyone have this already figured out?

Or… am I going about this the wrong way?

  • wiccan2@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    10 months ago

    I did something similar with Puppet a while ago, it also runs as root so hot the same problem.

    My solution was to set up my own package repo for the AUR packages I needed and just build them periodically. This way I only have to build them once for all the machines.

    • SayCyberOnceMore@feddit.ukOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      10 months ago

      I will be looking at setting up a local package cache soon, but hadn’t thought about putting the aur packages in the same one… nice.

      So, do you just build those packages anywhere and just copy to your repo?

      • wiccan2@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        9 months ago

        Basically.

        I build on my laptop and then add to the repo stored on my NAS.

        I’ve also got chaotic-aur set up as they tend to build the bulk of what I need from the AUR so I only have to build the more niche packages I use.