Skip to content

Instantly share code, notes, and snippets.

@ricfeatherstone
ricfeatherstone / enable-rhel-server-extras.py
Created February 2, 2016 12:35
Enable rhel-server-extras repository in AWS
#!/usr/bin/python
from __future__ import print_function
import fileinput
in_start_extras_section = False
for line in fileinput.input("/etc/yum.repos.d/redhat-rhui.repo", inplace=True):
if line.find("[rhui-REGION-rhel-server-extras]") != -1:
in_start_extras_section = True