Browse Source

Rename repos role to openshift_repos

- Rename repos role to openshift_repos
  - Make openshift_repos a dependency of openshift_common
  - Add README and metadata for openshift_repos
  - Playbook updates for role rename
- Verify libselinux-python is installed, otherwise some of the bulit-in
  modules we use fail
Jason DeTiberus 10 years ago
parent
commit
8613b70503

+ 0 - 1
playbooks/aws/openshift-master/config.yml

@@ -31,7 +31,6 @@
   vars_files:
     - vars.yml
   roles:
-    - repos
     - {
         role: openshift_master,
         openshift_node_ips: "{{ hostvars['localhost'].openshift_node_ips | default(['']) }}",

+ 1 - 2
playbooks/aws/openshift-node/config.yml

@@ -37,8 +37,6 @@
   vars_files:
     - vars.yml
   roles:
-    - repos
-    - docker
     - {
         role: openshift_node,
         openshift_master_ips: "{{ hostvars['localhost'].openshift_master_ips | default(['']) }}",
@@ -46,4 +44,5 @@
         openshift_env: "{{ oo_env }}"
         openshift_public_ip: "{{ ec2_ip_address }}"
       }
+    - docker
     - os_env_extras

+ 0 - 1
playbooks/gce/openshift-master/config.yml

@@ -31,7 +31,6 @@
   vars_files:
     - vars.yml
   roles:
-    - repos
     - {
         role: openshift_master,
         openshift_node_ips: "{{ hostvars['localhost'].openshift_node_ips | default(['']) }}",

+ 1 - 2
playbooks/gce/openshift-node/config.yml

@@ -37,8 +37,6 @@
   vars_files:
     - vars.yml
   roles:
-    - repos
-    - docker
     - {
         role: openshift_node,
         openshift_master_ips: "{{ hostvars['localhost'].openshift_master_ips | default(['']) }}",
@@ -46,4 +44,5 @@
         openshift_public_ip: "{{ gce_public_ip }}",
         openshift_env: "{{ oo_env }}",
       }
+    - docker
     - os_env_extras

+ 1 - 0
roles/openshift_common/README.md

@@ -25,6 +25,7 @@ Dependencies
 ------------
 
 os_firewall
+openshift_repos
 
 Example Playbook
 ----------------

+ 1 - 0
roles/openshift_common/meta/main.yml

@@ -13,3 +13,4 @@ galaxy_info:
   - cloud
 dependencies:
 - { role: os_firewall }
+- { role: openshift_repos }

+ 38 - 0
roles/openshift_repos/README.md

@@ -0,0 +1,38 @@
+OpenShift Repos 
+================
+
+Configures repositories for an OpenShift installation
+
+Requirements
+------------
+
+A RHEL 7.1 host pre-configured with access to the rhel-7-server-rpms,
+rhel-7-server-extra-rpms, and rhel-7-server-ose-beta-rpms repos.
+
+Role Variables
+--------------
+
+| Name                          | Default value |                                              |
+|-------------------------------|---------------|----------------------------------------------|
+| openshift_deployment_type     | online        | Possible values enterprise, origin, online   |
+| openshift_additional_repos    | {}            | TODO                                         |
+
+Dependencies
+------------
+
+None.
+
+Example Playbook
+----------------
+
+TODO
+
+License
+-------
+
+Apache License, Version 2.0
+
+Author Information
+------------------
+
+TODO

roles/repos/defaults/main.yaml → roles/openshift_repos/defaults/main.yaml


roles/repos/files/online/RPM-GPG-KEY-redhat-beta → roles/openshift_repos/files/online/RPM-GPG-KEY-redhat-beta


roles/repos/files/online/RPM-GPG-KEY-redhat-release → roles/openshift_repos/files/online/RPM-GPG-KEY-redhat-release


roles/repos/files/online/epel7-kubernetes.repo → roles/openshift_repos/files/online/epel7-kubernetes.repo


roles/repos/files/online/epel7-openshift.repo → roles/openshift_repos/files/online/epel7-openshift.repo


roles/repos/files/online/oso-rhui-rhel-7-extras.repo → roles/openshift_repos/files/online/oso-rhui-rhel-7-extras.repo


roles/repos/files/online/oso-rhui-rhel-7-server.repo → roles/openshift_repos/files/online/oso-rhui-rhel-7-server.repo


roles/repos/files/online/rhel-7-libra-candidate.repo → roles/openshift_repos/files/online/rhel-7-libra-candidate.repo


+ 14 - 0
roles/openshift_repos/meta/main.yml

@@ -0,0 +1,14 @@
+---
+galaxy_info:
+  author: TODO
+  description: OpenShift Repositories
+  company: Red Hat, Inc.
+  license: Apache License, Version 2.0
+  min_ansible_version: 1.7
+  platforms:
+  - name: EL
+    versions:
+    - 7
+  categories:
+  - cloud
+dependencies: []

+ 5 - 0
roles/repos/tasks/main.yaml

@@ -8,6 +8,11 @@
 - fail: msg="OpenShift Origin support is not currently enabled"
   when: openshift_deployment_type == 'origin'
 
+- name: Ensure libselinux-python is installed
+  yum:
+    pkg: libselinux-python
+    state: present
+
 - name: Create any additional repos that are defined
   template:
     src: yum_repo.j2

roles/repos/templates/yum_repo.j2 → roles/openshift_repos/templates/yum_repo.j2


roles/repos/vars/main.yml → roles/openshift_repos/vars/main.yml