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

Add task to remove unused repos and pkgs #11

Merged
merged 3 commits into from Jun 1, 2015
Merged

Add task to remove unused repos and pkgs #11

merged 3 commits into from Jun 1, 2015

Conversation

rndmh3ro
Copy link
Member

No description provided.

- '/etc/yum.repos.d/*.repo'

- name: activate gpg-check for yum rhn if it exists
shell: sed -i 's/gpgcheck=0/gpgcheck=1/g' /etc/yum/pluginconf.d/rhnplugin.conf removes='/etc/yum/pluginconf.d/rhnplugin.conf'
Copy link
Member

Choose a reason for hiding this comment

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

Use lineinfile for this. Why does sed remove the file?

@rndmh3ro
Copy link
Member Author

The problem with lineinfile is, that it only changes the first occurence of a string, not subsequent ones. Reading the documentation to this module, I saw that it mentions the replace-module for this case.
I changed the PR to use replace, making it more idempotent.

@chris-rock
Copy link
Member

amazing @rndmh3ro thanks for the improvement

chris-rock added a commit that referenced this pull request Jun 1, 2015
Add task to remove unused repos and pkgs
@chris-rock chris-rock merged commit c6121c2 into master Jun 1, 2015
@chris-rock chris-rock deleted the yum_rm_pkg branch June 1, 2015 12:49
rndmh3ro pushed a commit that referenced this pull request Jul 24, 2020
Add handler to restart ssh only if necessary. Fix #6
rndmh3ro pushed a commit that referenced this pull request Jul 24, 2020
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

Successfully merging this pull request may close these issues.

None yet

3 participants