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

apt::ppa failed to create the apt source "lock" file #1210

Open
llavaud opened this issue Dec 8, 2024 · 0 comments
Open

apt::ppa failed to create the apt source "lock" file #1210

llavaud opened this issue Dec 8, 2024 · 0 comments

Comments

@llavaud
Copy link

llavaud commented Dec 8, 2024

Describe the Bug

Module failed to create the apt source list file resulting in an installation of the PPA repository on every run.

Expected Behavior

The repository apt source list file must be created on the first installation.

Steps to Reproduce

Add a PPA repository

    apt::ppa {
        'ppa:duplicity-team/duplicity-release-git':
    }

Run puppet a first time, it will install the repository:

Notice: Compiled catalog for REDACTED in environment production in 2.02 seconds
Notice: /Stage[main]/Duplicity/Apt::Ppa[ppa:duplicity-team/duplicity-release-git]/Exec[add-apt-repository-ppa:duplicity-team/duplicity-release-git]/returns: executed successfully
Notice: Applied catalog in 29.86 seconds

The module must create the file /etc/apt/sources.list.d/duplicity-team-ubuntu-duplicity-release-git-noble.list to prevent re-installation on next runs, but it fail with the following error:

Debug: /Stage[main]/Duplicity/Apt::Ppa[ppa:duplicity-team/duplicity-release-git]/File[/etc/apt/sources.list.d/duplicity-team-ubuntu-duplicity-release-git-noble.list]: Nothing to manage: no ensure and the resource doesn't exist

Adding an ensure => file statement here seems to solve this issue.

Environment

  • Version: 8.10.0
  • Platform: Ubuntu 24.04
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

1 participant