diff options
author | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-17 16:22:09 -0400 |
---|---|---|
committer | Thomas Wiest <twiest@users.noreply.github.com> | 2015-07-17 16:22:09 -0400 |
commit | 27c0895327dc5d1153aae6c63e7a70f13eb1f0d4 (patch) | |
tree | a7a850a3f490e89fbc4956013a3e95bde08552eb /playbooks/libvirt | |
parent | b37fcf39edf13c90e7df33b41b4ca8de0aca0838 (diff) | |
parent | fb4083bb920d193c2f292b49f370667029c317ba (diff) | |
download | openshift-27c0895327dc5d1153aae6c63e7a70f13eb1f0d4.tar.gz openshift-27c0895327dc5d1153aae6c63e7a70f13eb1f0d4.tar.bz2 openshift-27c0895327dc5d1153aae6c63e7a70f13eb1f0d4.tar.xz openshift-27c0895327dc5d1153aae6c63e7a70f13eb1f0d4.zip |
Merge pull request #264 from lhuard1A/rhel_subscription
Implement RHEL subscription for enterprise deployment type
Diffstat (limited to 'playbooks/libvirt')
-rw-r--r-- | playbooks/libvirt/openshift-cluster/launch.yml | 2 | ||||
-rw-r--r-- | playbooks/libvirt/openshift-cluster/terminate.yml | 17 | ||||
-rw-r--r-- | playbooks/libvirt/openshift-cluster/vars.yml | 9 |
3 files changed, 24 insertions, 4 deletions
diff --git a/playbooks/libvirt/openshift-cluster/launch.yml b/playbooks/libvirt/openshift-cluster/launch.yml index a7ddc1e7e..6badcb325 100644 --- a/playbooks/libvirt/openshift-cluster/launch.yml +++ b/playbooks/libvirt/openshift-cluster/launch.yml @@ -13,7 +13,7 @@ image_name: "{{ deployment_vars[deployment_type].image.name }}" tasks: - fail: msg="Deployment type not supported for libvirt provider yet" - when: deployment_type in ['online', 'enterprise'] + when: deployment_type == 'online' - include: tasks/configure_libvirt.yml diff --git a/playbooks/libvirt/openshift-cluster/terminate.yml b/playbooks/libvirt/openshift-cluster/terminate.yml index b173a09dd..8f00812a9 100644 --- a/playbooks/libvirt/openshift-cluster/terminate.yml +++ b/playbooks/libvirt/openshift-cluster/terminate.yml @@ -15,6 +15,23 @@ ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}" with_items: groups[cluster_group] | default([]) +- name: Unsubscribe VMs + hosts: oo_hosts_to_terminate + vars_files: + - vars.yml + roles: + - role: rhel_unsubscribe + when: deployment_type == "enterprise" and + ansible_distribution == "RedHat" and + lookup('oo_option', 'rhel_skip_subscription') | default(rhsub_skip, True) | + default('no', True) | lower in ['no', 'false'] + +- name: Terminate instance(s) + hosts: localhost + gather_facts: no + vars_files: + - vars.yml + tasks: - name: Destroy VMs virt: name: '{{ item[0] }}' diff --git a/playbooks/libvirt/openshift-cluster/vars.yml b/playbooks/libvirt/openshift-cluster/vars.yml index e3c8cd8d0..c77a0797e 100644 --- a/playbooks/libvirt/openshift-cluster/vars.yml +++ b/playbooks/libvirt/openshift-cluster/vars.yml @@ -24,9 +24,12 @@ deployment_vars: sudo: no enterprise: image: - url: - name: - sha256: + url: "{{ lookup('oo_option', 'image_url') | + default('https://access.cdn.redhat.com//content/origin/files/sha256/ff/ff8198653cfd9c39411fc57077451ac291b3a605d305e905932fd6d5b1890bf3/rhel-guest-image-7.1-20150224.0.x86_64.qcow2', True) }}" + name: "{{ lookup('oo_option', 'image_name') | + default('rhel-guest-image-7.1-20150224.0.x86_64.qcow2', True) }}" + sha256: "{{ lookup('oo_option', 'image_sha256') | + default('ff8198653cfd9c39411fc57077451ac291b3a605d305e905932fd6d5b1890bf3', True) }}" ssh_user: openshift sudo: yes # origin: |