Browse Source

Merge pull request #143 from kwoodson/yum_repo

Adding yum_repo role
Kenny Woodson 10 years ago
parent
commit
285ff520ec

+ 34 - 0
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

+ 5 - 0
roles/yum_repo/defaults/main.yml

@@ -0,0 +1,5 @@
+---
+# defaults file for yum-repo
+repo_enabled: "1"
+repo_gpg_check: "1"
+

+ 2 - 0
roles/yum_repo/handlers/main.yml

@@ -0,0 +1,2 @@
+---
+# handlers file for yum-repo

+ 8 - 0
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: []

+ 8 - 0
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
+

+ 5 - 0
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 }}

+ 2 - 0
roles/yum_repo/vars/main.yml

@@ -0,0 +1,2 @@
+---
+# vars file for yum-repo