浏览代码

Only use openshift_repos from test playbooks

Jeremiah Stuever 6 年之前
父节点
当前提交
e2e352b4ff

+ 0 - 4
playbooks/init/main.yml

@@ -6,10 +6,6 @@
 
 - import_playbook: basic_facts.yml
 
-# NOTE: we must call init repos before installing base packages
-# because they may come from the repos.
-- import_playbook: repos.yml
-
 # base_packages needs to be setup for openshift_facts.py to run correctly.
 - import_playbook: base_packages.yml
   when: l_install_base_packages | default(False) | bool

+ 0 - 17
playbooks/init/repos.yml

@@ -1,17 +0,0 @@
----
-# l_repo_hosts is passed in via prerequisites.yml.
-
-- name: Setup yum repositories for all hosts
-  hosts: "{{ l_repo_hosts | default('all:!all') }}"
-  gather_facts: no
-  tasks:
-  - name: subscribe instances to Red Hat Subscription Manager
-    import_role:
-      name: rhel_subscribe
-    when:
-    - ansible_distribution == 'RedHat'
-    - openshift_deployment_type == 'openshift-enterprise'
-    - (rhsub_user is defined and rhsub_pass is defined) or (rhsub_ak is defined and rhsub_orgid is defined)
-  - name: initialize openshift repos
-    import_role:
-      name: openshift_repos

+ 0 - 43
roles/rhel_subscribe/README.md

@@ -1,43 +0,0 @@
-RHEL Subscribe
-==============
-
-Subscribes the RHEL servers and add the OpenShift enterprise repos.
-
-Role variables
---------------
-
-**NOTE**: `rhsub_user`/`rhsub_pass` and `rhsub_ak`/`rhsub_orgid` are mutually exclusive:
-* If you want to use user/password to register the instance, it is required to
-configure the `rhsub_user` and `rhsub_pass`.
-* If you want to use an activation key to register the instance, it is required to
-configure the `rhsub_ak` and `rhsub_orgid`.
-
-### `rhsub_user`
-
-Username for the subscription-manager.
-
-### `rhsub_pass`
-
-Password for the subscription-manager.
-
-### `rhsub_ak`
-
-Activation key for the subscription-manager.
-
-### `rhsub_orgid`
-
-Organization ID for the subscription-manager.
-
-### `rhsub_pool`
-
-Name of the pool to attach (optional).
-
-### `rhsub_server`
-
-Custom hostname for the Satellite server (optional).
-
-### `openshift_release`
-
-Version for the OpenShift Container Platform repositories.
-
-Example: `3.6`

+ 0 - 2
roles/rhel_subscribe/defaults/main.yml

@@ -1,2 +0,0 @@
----
-rhsub_pool: 'Red Hat OpenShift Container Platform, Premium*'

+ 0 - 2
roles/rhel_subscribe/meta/main.yml

@@ -1,2 +0,0 @@
----
-dependencies: []

+ 0 - 55
roles/rhel_subscribe/tasks/main.yml

@@ -1,55 +0,0 @@
----
-- fail:
-    msg: "This role is only supported for Red Hat hosts"
-  when: ansible_distribution != 'RedHat'
-
-- name: Install Red Hat Subscription manager
-  yum:
-    name: subscription-manager
-    state: present
-  register: result
-  until: result is succeeded
-
-- name: Is host already registered?
-  command: "subscription-manager version"
-  register: rh_subscribed
-  changed_when: False
-
-- name: Register host using user/password
-  redhat_subscription:
-    username: "{{ rhsub_user }}"
-    password: "{{ rhsub_pass }}"
-  register: rh_subscription
-  until: rh_subscription is succeeded
-  when:
-    - "'not registered' in rh_subscribed.stdout"
-    - rhsub_user is defined
-    - rhsub_pass is defined
-
-- name: Register host using activation key
-  redhat_subscription:
-    activationkey: "{{ rhsub_ak }}"
-    org_id: "{{ rhsub_orgid }}"
-  register: rh_subscription
-  until: rh_subscription is succeeded
-  when:
-    - "'not registered' in rh_subscribed.stdout"
-    - rhsub_ak is defined
-    - rhsub_orgid is defined
-
-- name: Determine if OpenShift Pool Already Attached
-  command: "subscription-manager list --consumed --pool-only --matches '*OpenShift*'"
-  register: openshift_pool_attached
-  changed_when: False
-  ignore_errors: yes
-
-- name: Attach to OpenShift Pool
-  command: "subscription-manager attach --pool {{ rhsub_pool }}"
-  register: openshift_pool_attached
-  changed_when: "'Successfully attached a subscription' in openshift_pool_attached.stdout"
-  when: rhsub_pool not in openshift_pool_attached.stdout
-
-- import_tasks: satellite.yml
-  when:
-    - rhsub_server is defined
-    - rhsub_server

+ 0 - 5
roles/rhel_subscribe/tasks/satellite.yml

@@ -1,5 +0,0 @@
----
-- name: Satellite preparation
-  command: "rpm -Uvh http://{{ rhsub_server }}/pub/katello-ca-consumer-latest.noarch.rpm"
-  args:
-    creates: /etc/rhsm/ca/katello-server-ca.pem

+ 5 - 0
test/aws/scaleup.yml

@@ -32,6 +32,11 @@
       owner: root
       group: root
       mode: 0644
+  - name: Initialize openshift repos
+    import_role:
+      name: openshift_repos
+    vars:
+      openshift_version: "4.0"
 
 - import_playbook: ../../playbooks/openshift-node/scaleup.yml