From 3c521113b4b7a79d69c788600df67c460c887963 Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Wed, 8 Apr 2015 16:53:28 -0400 Subject: Adding yum_repo role for facilitating repository deployment --- roles/yum_repo/README.md | 34 ++++++++++++++++++++++++++++++++++ roles/yum_repo/defaults/main.yml | 5 +++++ roles/yum_repo/handlers/main.yml | 2 ++ roles/yum_repo/meta/main.yml | 8 ++++++++ roles/yum_repo/tasks/main.yml | 8 ++++++++ roles/yum_repo/templates/yumrepo.j2 | 5 +++++ roles/yum_repo/vars/main.yml | 2 ++ 7 files changed, 64 insertions(+) create mode 100644 roles/yum_repo/README.md create mode 100644 roles/yum_repo/defaults/main.yml create mode 100644 roles/yum_repo/handlers/main.yml create mode 100644 roles/yum_repo/meta/main.yml create mode 100644 roles/yum_repo/tasks/main.yml create mode 100644 roles/yum_repo/templates/yumrepo.j2 create mode 100644 roles/yum_repo/vars/main.yml 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 -- cgit v1.2.3