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

Replace sources.list not working #1156

Open
nem8 opened this issue Dec 19, 2023 · 4 comments
Open

Replace sources.list not working #1156

nem8 opened this issue Dec 19, 2023 · 4 comments

Comments

@nem8
Copy link

nem8 commented Dec 19, 2023

Describe the Bug

According to https://github.com/puppetlabs/puppetlabs-apt#replace-the-default-sourceslist-file i should be able to replace existing sources.list file with one containing the specified apt repositories.
This does not work, it will create a file in sources.list.d tho..

Expected Behavior

I expected it to replace sources.list with content provided, not create a new sources.list.d/ file

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create or add code in puppet like:
    apt::source {
    "archive.debian.org-${facts['os']['distro']['codename']}":
    location => 'http://archive.debian.org/debian',
    repos => 'main contrib non-free',
    }
  2. Assign manifest file to object in foreman.
  3. Run puppet agent -t on client

Environment

  • Debian 9
  • Puppet 6

Additional Context

Im testing this out as i need to change to the archive repo on all debian 9 servers.
Documentation states that apt::source will edit sources.list.d , but examples say that it will replace sources.list.
It didnt replace sources.list :(

@kenyon
Copy link

kenyon commented Dec 19, 2023

The module works by managing files in sources.list.d. The end result is equivalent to having everything in sources.list.

@nem8
Copy link
Author

nem8 commented Dec 19, 2023

So, to use the module for managing archive repos you would have to delete source.list and then let the module create archive repo in source.list.d?

@kenyon
Copy link

kenyon commented Dec 19, 2023

The module does this for you.

@nem8
Copy link
Author

nem8 commented Dec 19, 2023

With purge you mean? I have other repos not manage by the module so i wont want to do that, but I could do a file delete and let it create archive repo..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants