This playbook will be used to setup testnodes for downstream
testing by downloading arbitrary yum repos. The repos to install should
be passed in with the --extra-vars option to ansible-playbook.
The yum_repos var must be a list of hashes defining the url to download
the repo from and the name to save it as in /etc/yum.repos.d
For example:
--extra-vars '{"yum_repos":[{"url": "<url>", "name": "name"}]}'
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
--- /dev/null
+---
+# A playbook used to setup a node for downstream
+# RHCeph testing.
+- hosts: testnodes
+ roles:
+ - downstream-setup
--- /dev/null
+---
+# yum_repos is a list of hashes that
+# define the url to download the yum repo
+# from and the name to save it as in etc/yum.repos.d
+#
+# For example:
+# yum_repos:
+# - url: "http://path/to/epel.repo"
+# name: "epel"
+#
+yum_repos: []
--- /dev/null
+---
+- include: yum_repos.yml
+ tags:
+ - yum-repos
--- /dev/null
+---
+- name: Download yum repos to /etc/yum.repos.d
+ get_url:
+ url: "{{ item.url }}"
+ dest: "/etc/yum.repos.d/{{ item.name }}.repo"
+ force: yes
+ with_items: yum_repos