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

fix 'nodejs::repo_ensure: absent' for yum #373

Merged
merged 1 commit into from
Jun 2, 2018
Merged

fix 'nodejs::repo_ensure: absent' for yum #373

merged 1 commit into from
Jun 2, 2018

Conversation

bugfood
Copy link

@bugfood bugfood commented Jun 1, 2018

Presently, setting ensure to 'absent' results in creating two files in
/etc/yum.repos.d:

$ cat nodesource.repo
[nodesource]
$ cat nodesource-source.repo
[nodesource-source]

This results in yum failure:
$ sudo yum check-update
Loaded plugins: fastestmirror, security
Repository 'nodesource-source' is missing name in configuration, using id
Repository 'nodesource' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: nodesource

It is better to ensure these files do not exist. The corresponding apt
class is already set up this way.

Note: I was unable to get local tests working for this module. Please
test before merging.

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

Presently, setting ensure to 'absent' results in creating two files in
/etc/yum.repos.d:

$ cat nodesource.repo
[nodesource]
$ cat nodesource-source.repo
[nodesource-source]

This results in yum failure:
$ sudo yum check-update
Loaded plugins: fastestmirror, security
Repository 'nodesource-source' is missing name in configuration, using id
Repository 'nodesource' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
Error: Cannot find a valid baseurl for repo: nodesource

It is better to ensure these files do not exist. The corresponding apt
class is already set up this way.

Note: I was unable to get local tests working for this module, but I see
that there are automated tests; I will ensure they work.
@bugfood
Copy link
Author

bugfood commented Jun 1, 2018

I had a bit of trouble with the tests at first, but I think I got it straightened out. Please let me know if there is anything that needs fixing.

Thanks,
Corey

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct to me.

@juniorsysadmin juniorsysadmin added the bug Something isn't working label Jun 2, 2018
@juniorsysadmin juniorsysadmin merged commit 7ebcefb into voxpupuli:master Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants