GithubHelp home page GithubHelp logo

ansible-yay's People

Contributors

ejwmoreau avatar larssonoliver avatar mnussbaum 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-yay's Issues

Error if running with disabled root account

I'm trying to run this module and I'm getting this error:

Failed to install package brave-bin, because: sudo: Account or password is expired, reset your password and try again
sudo: unable to change expired password: Authentication token manipulation error
sudo: a password is required

I think this is because my root login is disabled, however I had no problems whatsoever with other tasks using community.general.pacman and become: true.

Re-enabling root fixes the problem.

Any idea on how to fix this?

ansible-galaxy?

hi, did you consider making this available through the ansible-galaxy?

Debug packages.

Is it normal for this Ansible module to install both the normal (do-agent) and debug (do-agent-debug) variants of a package it builds?

The status changed should be false if a package state equals to present

yay module doesn't keep track of the packages installed, it re-installs them because of the default behavior of yay (see below for the explanation).

I ran this example playbook on Vagrant.

# test.yml
---
- name: Test
  hosts: all
  gather_facts: true
  tasks:
    - name: Install ntp
      pacman:
        name: extra/ntp
        state: present
      become: true

    - name: Install git
      yay:
        name: extra/git
        state: present

1st run:

ansible-playbook -v -i tests/vagrant/vagrant.inventory playbooks/test.yml

PLAY [Test] ***************************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************
ok: [192.168.56.2]

TASK [Install ntp] ********************************************************************************************************************************************
changed: [192.168.56.2] => {"changed": true, "msg": "installed 1 package(s). ", "stderr": "", "stderr_lines": [], "stdout": "resolving dependencies.."]}

TASK [Install git] ********************************************************************************************************************************************
changed: [192.168.56.2] => {"changed": true, "msg": "installed 1 package(s). ", "stderr": "", "stderr_lines": [], "stdout": "resolving dependencies.."]}

PLAY RECAP ****************************************************************************************************************************************************
192.168.56.2               : ok=3    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Result: 2 changed
Expected: 2 changed

2nd run:

ansible-playbook -v -i tests/vagrant/vagrant.inventory playbooks/test.yml

PLAY [Test] ***************************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************
ok: [192.168.56.2]

TASK [Install ntp] ********************************************************************************************************************************************
ok: [192.168.56.2] => {"changed": false, "msg": "package(s) already installed. "}

TASK [Install git] ********************************************************************************************************************************************
changed: [192.168.56.2] => {"changed": true, "msg": "Installed 1 package(s). "}

PLAY RECAP ****************************************************************************************************************************************************
192.168.56.2               : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

Result: 1 changed
Expected: 0 changed


I think the solution is to add the --needed tag to the default install command.

--needed Do not reinstall the targets that are already up-to-date.

https://archlinux.org/pacman/pacman.8.html#_upgrade_options_apply_to_em_s_em_and_em_u_em_a_id_uo_a

$ yay -S extra/git
warning: git-2.35.1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) git-2.35.1-1

Total Installed Size:  33,31 MiB
Net Upgrade Size:       0,00 MiB

:: Proceed with installation? [Y/n] ^C
Interrupt signal received


$ yay -S extra/git --needed
warning: git-2.35.1-1 is up to date -- skipping
 there is nothing to do


$ echo $?
0

Could not update package db: Please avoid running yay as root/sudo.

Hi,

if I run the task without become:yes it stops without going any furthe, otherwise I get the error "could not update package db: Please avoid running yay as root/sudo."

If I run yay manually I get the same error if I prepend it with sudo, otherwise I get a prompt [sudo] password for <user>:

Any idea what I'm doing wrong?

Edit: This is my task:

- name: Update system
  #become: yes
  yay:
    update_cache: yes
    upgrade: yes

pypi package

could you create a pypi package so one could install it via pip install ansible-yay?

Unable to install packages when there's a choice for dependencies

When running this task ansible is unable to continue. To be more specific, it stops when installing perl-image-exiftool.

I think the reason for it to stop is that when installing perl-image-exiftool we need to specify which of the dependencies we want - I don't remember specifically which but I can fetch the names later.

I'm not sure if this can be categorized as an issue once this is like a manual step for installing such packages. Anyhow, I'd appreciate some help on how to work around these cases or, even better, a fix that works around it.

Requesting sudo password

I've just ran for the first time this module.
I'm installing some AUR packages with it, but always that it start the task, it request me my sudo password:

TASK [role : Task name] ***
[sudo] password for darguima:
changed: [localhost]

I don't know if this is the normal behavior, but it would be nice if I doesn't need insert my password, as long as I pass the --ask-become-pass, and if I'm installing something with pacman for example, using the become: true I don't need passwords.

Just because I want run something automatized that don't need human interaction.

Is this a bug, or the normal behavior?

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.