summaryrefslogtreecommitdiffstats
path: root/roles/yum_repo
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2015-04-09 09:03:21 -0400
committerKenny Woodson <kwoodson@redhat.com>2015-04-09 09:03:21 -0400
commit285ff520ec5090bb89277efc3c89601b01e69990 (patch)
tree6f9d76f7a06f9c641a848b82cfa27567826f2984 /roles/yum_repo
parentb87616816b591aa357de60415be00a514dcb7c6a (diff)
parent3c521113b4b7a79d69c788600df67c460c887963 (diff)
downloadopenshift-285ff520ec5090bb89277efc3c89601b01e69990.tar.gz
openshift-285ff520ec5090bb89277efc3c89601b01e69990.tar.bz2
openshift-285ff520ec5090bb89277efc3c89601b01e69990.tar.xz
openshift-285ff520ec5090bb89277efc3c89601b01e69990.zip
Merge pull request #143 from kwoodson/yum_repo
Adding yum_repo role
Diffstat (limited to 'roles/yum_repo')
-rw-r--r--roles/yum_repo/README.md34
-rw-r--r--roles/yum_repo/defaults/main.yml5
-rw-r--r--roles/yum_repo/handlers/main.yml2
-rw-r--r--roles/yum_repo/meta/main.yml8
-rw-r--r--roles/yum_repo/tasks/main.yml8
-rw-r--r--roles/yum_repo/templates/yumrepo.j25
-rw-r--r--roles/yum_repo/vars/main.yml2
7 files changed, 64 insertions, 0 deletions
diff --git a/roles/yum_repo/README.md b/roles/yum_repo/README.md
new file mode 100644
index 000000000..7f6a615cb
--- /dev/null
+++ b/roles/yum_repo/README.md
@@ -0,0 +1,34 @@
+Role Name
+=========
+
+This role allows easy deployment of yum repository config files.
+
+Requirements
+------------
+
+Yum
+
+Role Variables
+--------------
+
+Dependencies
+------------
+
+Example Playbook
+----------------
+
+Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
+
+ - hosts: servers
+ roles:
+ - { role: username.rolename, x: 42 }
+
+License
+-------
+
+ASL 2.0
+
+Author Information
+------------------
+
+openshift online operations
diff --git a/roles/yum_repo/defaults/main.yml b/roles/yum_repo/defaults/main.yml
new file mode 100644
index 000000000..95e78af69
--- /dev/null
+++ b/roles/yum_repo/defaults/main.yml
@@ -0,0 +1,5 @@
+---
+# defaults file for yum-repo
+repo_enabled: "1"
+repo_gpg_check: "1"
+
diff --git a/roles/yum_repo/handlers/main.yml b/roles/yum_repo/handlers/main.yml
new file mode 100644
index 000000000..a48c89ac2
--- /dev/null
+++ b/roles/yum_repo/handlers/main.yml
@@ -0,0 +1,2 @@
+---
+# handlers file for yum-repo
diff --git a/roles/yum_repo/meta/main.yml b/roles/yum_repo/meta/main.yml
new file mode 100644
index 000000000..e0b53ce7f
--- /dev/null
+++ b/roles/yum_repo/meta/main.yml
@@ -0,0 +1,8 @@
+---
+galaxy_info:
+ author: openshift operations
+ description:
+ company: RedHat
+ license: ASL 2.0
+ min_ansible_version: 1.2
+dependencies: []
diff --git a/roles/yum_repo/tasks/main.yml b/roles/yum_repo/tasks/main.yml
new file mode 100644
index 000000000..a56d1f133
--- /dev/null
+++ b/roles/yum_repo/tasks/main.yml
@@ -0,0 +1,8 @@
+---
+# tasks file for yum-repo
+
+- name: Installing yum-repo template
+ template:
+ src: yumrepo.j2
+ dest: /etc/yum.repos.d/{{ repo_tag }}.repo
+
diff --git a/roles/yum_repo/templates/yumrepo.j2 b/roles/yum_repo/templates/yumrepo.j2
new file mode 100644
index 000000000..b06a6f41a
--- /dev/null
+++ b/roles/yum_repo/templates/yumrepo.j2
@@ -0,0 +1,5 @@
+[{{ repo_tag }}]
+name={{ repo_name }}
+baseurl={{ repo_baseurl }}
+enabled={{ repo_enabled }}
+gpg_check={{ repo_gpg_check }}
diff --git a/roles/yum_repo/vars/main.yml b/roles/yum_repo/vars/main.yml
new file mode 100644
index 000000000..48182ac8e
--- /dev/null
+++ b/roles/yum_repo/vars/main.yml
@@ -0,0 +1,2 @@
+---
+# vars file for yum-repo