-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Standardize openshift roles to OASIS
- Loading branch information
1 parent
be6db0f
commit 6dbb087
Showing
26 changed files
with
196 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
skip_list: | ||
- "204" # disable LineTooLongRule | ||
- "503" # disable "Tasks run when changed should be handlers" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.*.swp | ||
.*.swo | ||
*.pyc | ||
*.pyo | ||
__pycache__/* | ||
molecule/*/junit.xml | ||
molecule/*/pytestdebug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Ryan Cole <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
openshift_become: true | ||
openshift_become_user: root |
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
linchpin/provision/roles/openshift/filter_plugins/add_res_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../filter_plugins/add_res_data.py |
1 change: 1 addition & 0 deletions
1
linchpin/provision/roles/openshift/filter_plugins/get_pod_status.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../filter_plugins/get_pod_status.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Handlers for openshift |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../library/auth_driver.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
galaxy_info: | ||
author: Samvaran Rallabandi | ||
description: openshift provisioning for LinchPin | ||
company: Red Hat, Inc. | ||
license: GPLv3 | ||
min_ansible_version: 2.8 | ||
platforms: | ||
- name: EL | ||
versions: | ||
- 7 | ||
- 8 | ||
- name: Fedora | ||
versions: | ||
- 30 | ||
- 31 | ||
galaxy_tags: | ||
- oasis | ||
- linchpin | ||
- openshift |
6 changes: 6 additions & 0 deletions
6
linchpin/provision/roles/openshift/molecule/delegated/create.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- name: Create | ||
hosts: all | ||
tasks: | ||
- name: "Create molecule instances" | ||
debug: | ||
msg: "Creating..." |
7 changes: 7 additions & 0 deletions
7
linchpin/provision/roles/openshift/molecule/delegated/destroy.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- name: Destroy | ||
hosts: localhost | ||
connection: local | ||
gather_facts: false | ||
roles: | ||
- role: oasis_roles.molecule_docker_ci | ||
molecule_docker_ci_state: absent |
40 changes: 40 additions & 0 deletions
40
linchpin/provision/roles/openshift/molecule/delegated/molecule.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
dependency: | ||
name: galaxy | ||
options: | ||
role-file: molecule/shared/requirements.yml | ||
driver: | ||
name: delegated | ||
options: | ||
managed: false | ||
ansible_connection_options: | ||
ansible_connection: local | ||
lint: | ||
name: yamllint | ||
options: | ||
config-file: tests/yamllint.yml | ||
platforms: | ||
- name: openshift-delegated | ||
provisioner: | ||
name: ansible | ||
lint: | ||
name: ansible-lint | ||
playbooks: | ||
prepare: ../shared/prepare.yml | ||
converge: ../shared/playbook.yml | ||
cleanup: ../shared/cleanup.yml | ||
config_options: | ||
defaults: | ||
stdout_callback: yaml | ||
verifier: | ||
name: testinfra | ||
options: | ||
# Add a -v so you see the individual test names, | ||
# particularly useful with parameterized tests | ||
v: true | ||
lint: | ||
name: flake8 | ||
# Using the shared directory is useful for sharing tests across scenarios, | ||
# but is not a requirement. For scenario specific tests, add the appropriate | ||
# file path to the test or test directory below | ||
additional_files_or_dirs: | ||
- ../../shared/tests |
8 changes: 8 additions & 0 deletions
8
linchpin/provision/roles/openshift/molecule/delegated/tests/test_null.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Without at least a file here, tests in the additional directory will not | ||
# get picked up. If you add actual tests to this directory, then you can | ||
# safely eliminate this file. Otherwise, it exists only to cause the tests in | ||
# shared/tests to be discovered. | ||
# | ||
# Most tests should be written in the shared/tests directory so that they can | ||
# be captured by all the scenarios. Only add tests here if there are tests | ||
# only relevant to a particular scenario |
22 changes: 22 additions & 0 deletions
22
linchpin/provision/roles/openshift/molecule/shared/cleanup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
- name: unregister systems | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: wait for host | ||
wait_for_connection: | ||
timeout: 1 | ||
register: waiting | ||
ignore_errors: true | ||
|
||
- block: | ||
- name: fetch facts | ||
setup: {} | ||
|
||
- name: do unregistration | ||
include_role: | ||
name: oasis_roles.rhsm | ||
when: ansible_distribution == 'RedHat' | ||
when: waiting is success | ||
vars: | ||
rhsm_unregister: true | ||
rhsm_username: "{{ omit }}" |
5 changes: 5 additions & 0 deletions
5
linchpin/provision/roles/openshift/molecule/shared/playbook.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
- name: converge | ||
hosts: all | ||
roles: | ||
- role: openshift | ||
post_tasks: [] |
15 changes: 15 additions & 0 deletions
15
linchpin/provision/roles/openshift/molecule/shared/prepare.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
- name: register RHSM | ||
hosts: all | ||
roles: | ||
- role: oasis_roles.rhsm | ||
when: ansible_distribution == 'RedHat' | ||
vars: | ||
rhsm_username: "{{ lookup('env', 'OASIS_RHSM_USERNAME') }}" | ||
rhsm_password: "{{ lookup('env', 'OASIS_RHSM_PASSWORD') }}" | ||
rhsm_server_hostname: "{{ lookup('env', 'OASIS_RHSM_SERVER_HOSTNAME') }}" | ||
rhsm_pool_ids: "{{ lookup('env', 'OASIS_RHSM_POOL_IDS') }}" | ||
rhsm_repositories: | ||
enabled: | ||
- rhel-7-server-rpms | ||
- rhel-7-server-extras-rpms | ||
- rhel-7-server-optional-rpms |
2 changes: 2 additions & 0 deletions
2
linchpin/provision/roles/openshift/molecule/shared/requirements.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- oasis_roles.rhsm | ||
- oasis_roles.molecule_docker_ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
--- | ||
# This playbook will provision OpenShift resources | ||
|
||
- name: allocate openshift output variables | ||
set_fact: | ||
topology_outputs_openshift_resources: [] | ||
|
||
- name: "Initiating Provision/Teardown of openstack resource group" | ||
include: provision_resource_group.yml res_grp={{ item }} | ||
include_tasks: provision_resource_group.yml | ||
vars: | ||
res_grp: "{{ item }}" | ||
with_items: | ||
- "{{ resources }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
linchpin/provision/roles/openshift/tasks/provision_res_defs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
- name: "provision/teardown resources }}" | ||
# The following include might change to role if | ||
# The following include might change to role if | ||
# multiple openshift resources come in | ||
#include: "provision_{{ res_def['role'] }}.yml" | ||
include: "provision_openshift.yml" | ||
include_tasks: "provision_openshift.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends: default | ||
|
||
rules: | ||
line-length: | ||
level: error | ||
document-start: | ||
present: false | ||
level: error | ||
comments: | ||
require-starting-space: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Vars for openshift |