summaryrefslogtreecommitdiff
path: root/roles/lib_utils
AgeCommit message (Collapse)Author
2018-02-13Adding ability to yedit json files.Kenny Woodson
2018-02-13Merge pull request #7106 from jarrpa/pvc-gen-storageclassOpenShift Merge Robot
Automatic merge from submit-queue. Allow for blank StorageClass in PVC creation In the case where a default StorageClass is already defined and a PV's storage kind is not 'dynamic', allows for the storageClassName of the associated PVC to be blank so as to not use the default SC. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1544387 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2018-02-12Merge pull request #7113 from mgugino-upstream-stage/fix-etcd-scaleup-sanityMichael Gugino
Fix etcd scaleup plays
2018-02-12Fix etcd scaleup playsMichael Gugino
This commit ensures that only the proper host groups have sanity checks run during etcd scaleup. This commit also adds additional debugging statements to sanity_checks.py to make it easier to debug when an error occurs. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1543771
2018-02-12Allow for blank StorageClass in PVC creationJose A. Rivera
In the case where a default StorageClass is already defined and a PV's storage kind is not 'dynamic', allows for the storageClassName of the associated PVC to be blank so as to not use the default SC. Signed-off-by: Jose A. Rivera <jarrpa@redhat.com>
2018-02-10Verify that requested services have schedulable nodes matching the selectorsVadim Rutkovsky
Signed-off-by: Vadim Rutkovsky <vrutkovs@redhat.com>
2018-02-08Merge pull request #6926 from abutcher/etcd-ca-hostScott Dodson
Determine which host is the etcd CA host
2018-02-05Initial support for 3.10Scott Dodson
2018-02-01lib_utils_oo_collect: Allow filtering on dot separated keys.Andrew Butcher
2018-01-30Merge pull request #6919 from mfojtik/symlink-kubectl-to-ocOpenShift Merge Robot
Automatic merge from submit-queue. Symlink kubectl to oc instead of openshift Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1538933 @sdodson @juanvallejo FYI
2018-01-30docker_creds: decode docker_config for py3 only if its a stringVadim Rutkovsky
2018-01-29Symlink kubectl to oc instead of openshiftMichal Fojtik
2018-01-25Merge pull request #6859 from abutcher/bz1536217OpenShift Merge Robot
Automatic merge from submit-queue. Bug 1536217: Need to validate etcd serving certs before 3.9 upgrade
2018-01-25[1502838] Correct certificate alt name parsingRussell Teague
Certificates may have alternate names specified, which may contain different name types. Only 'DNS' alternate types should be parsed. X509v3 Subject Alternative Name: email:hostmaster@example.com, DNS:host.example.com Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1502838
2018-01-24Redeploy etcd certificates during upgrade when etcd hostname not present in ↵Andrew Butcher
etcd serving cert SAN.
2018-01-24Create swapoff moduleMichael Gugino
Create custome ansible module 'swapoff' to idempotently disable swap in /etc/fstab and also run swapoff.
2018-01-24Merge pull request #6603 from joelddiaz/fetch_subnet_azOpenShift Merge Robot
Automatic merge from submit-queue. un-hardcode default subnet az allow defining 'default_az' for one of the subnets in the vpc structure, and pull that default_az and set it to openshift_aws_subnet_az. this should allow one less variable to be defined/overridded when using non-default (us-east-1) regions
2018-01-23Merge pull request #6682 from giuseppe/fix-registriesMichael Gugino
CRI-O, Docker: Use images from the CentOS and Fedora registry
2018-01-22un-hardcode default subnet azJoel Diaz
allow defining 'default_az' for one of the subnets in the vpc structure, and pull that default_az and set it to openshift_aws_subnet_az. this should allow one less variable to have to be defined/overridded (openshift_aws_subnet_az) when using non-default (us-east-1) regions update provisioning_vars.yml.example to show an example VPC structure
2018-01-18Add ability to mount volumes into system container nodesMichael Gugino
This commit adds the ability to mount volumes into system containerized nodes. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534933
2018-01-12Don't use from ansible.module_utils.six as its no longer available in ↵Vadim Rutkovsky
Ansible 2.4
2018-01-10Move more plugins to lib_utilsMichael Gugino
This commit continues moving plugins into lib_utils. This commit does not move any plugins for add-on roles such as logging and metrics.
2018-01-10docker_creds: fix python3 exceptionGiuseppe Scrivano
Fixes: Object of type 'bytes' is not JSON serializable Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-01-10docker_creds: fix python3 exceptionGiuseppe Scrivano
Solves this exception with python3: TypeError: a bytes-like object is required, not 'str Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2018-01-09Refactor version and move some checks into sanity_checks.pyMichael Gugino
This commit changes how we handle openshift_version role. Most of the version initialization code is only run on the first master now. All other hosts have values set from the master. Aftwards, we run some basic RPM queries to ensure that the correct version is available on the other nodes. Containerized needs to do their own image checks elsewhere.
2018-01-05Migrate to import_role for static role inclusionScott Dodson
In Ansible 2.2, the include_role directive came into existence as a Tech Preview. It is still a Tech Preview through Ansible 2.4 (and in current devel branch), but with a noteable change. The default behavior switched from static: true to static: false because that functionality moved to the newly introduced import_role directive (in order to stay consistent with include* being dynamic in nature and `import* being static in nature). The dynamic include is considerably more memory intensive as it will dynamically create a role import for every host in the inventory list to be used. (Also worth noting, there is at the time of this writing an object allocation inefficiency in the dynamic include that can in certain situations amplify this effect considerably) This change is meant to mitigate the pressure on memory for the Ansible control host. We need to evaluate where it makes sense to dynamically include roles and revert back to dynamic inclusion if and where it makes sense to do so.
2017-12-21Remove references to deployment_typeMichael Gugino
Move openshift_deployment_type check into sanity_check action plugin. Remove compatibility for deployment_type. deployment_type has been deprecated for some time now.
2017-12-20Move validate_hosts to prerequisites.ymlMichael Gugino
Move more checks outside of init/main.yml for speeding up upgrades and other operational plays that need to run.
2017-12-20Move sanity_checks into custom action pluginMichael Gugino
This commit moves sanity_checks tasks into a custom action plugin that is only run against a single host. This will result in a large reduction of tasks during initialization
2017-12-18Relocate filter plugins to lib_utilsMichael Gugino
This commit relocates filter_plugings to lib_utils, changes the namespacing to prevent unintended use of older versions that may be present in filter_plugins/ directory on existing installs. Add lib_utils to meta depends for roles Also consolidate some plugins into lib_utils from various other areas. Update rpm spec, obsolete plugin rpms.
2017-12-11Copying upstream fix for ansible 2.4 ec2_group module.Kenny Woodson
2017-11-14Alternative method to create docker registry auth credsMichael Gugino
Currently, the command 'docker login' is run when using oreg with authentication. On some hosts, such as hosts configured to use system containers, the docker service is not running. 'docker login' will fail without the docker service running. This commit adds a module to idempotently add credentials to the registry credentials file without the use of 'docker login' Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1511374
2017-09-20Returning actual results of yedit query. Empty list was returning empty dict.Kenny Woodson
2017-09-13add retry on repoquery_cmdLuke Meyer
2017-09-13add retries to repoquery moduleLuke Meyer
2017-08-21First attempt at provisioning.Kenny Woodson
2017-05-13Fix python3 error in repoqueryJeff Peeler
Explicitly convert from bytes to string so that splitting the string is successful. This change works with python 2 as well. Closes #4182
2017-05-12Merge pull request #4065 from ingvagabund/introduce-get-rpm-version-roleJan Chaloupka
Introduce excluder-free rpm version detection role
2017-05-11Extend repoquery command (of lib_utils role) to ignore excludersJan Chaloupka
2017-05-10Fix for yedit custom separatorsMatt Woodson
2017-03-28Fixed a bug in oc_volume.Kenny Woodson
2017-03-28Adding a few more test cases. Fixed a bug when key was empty. Safeguard ↵Kenny Woodson
against yedit module being passed an empty key
2017-03-28Added the ability to do multiple editsKenny Woodson
2017-03-06Remove dummy setup/teardown methodsRodolfo Carvalho
2017-03-06Clean up test filesRodolfo Carvalho
They are not executable anymore, and tests are now meant to be run through pytest.
2017-03-06Remove redundant assertionRodolfo Carvalho
That line is testing Python's list.count method, instead of yedit. The assertion right above is a superset of it, as it checks for equality to some expected value.
2017-03-03BZ1422348 - Don't install python-ruamel-yamlScott Dodson
Just rely on PyYAML as a fallback and hope that's there
2017-02-28raise exceptions when walking through object pathJoel Diaz
if we're given path a.b.c and the existing object is: a: b: - item1 raise an exception due to unexpected objects found while traversing the path (ie. b is a list, not a dict) also, add_entry assumes new dicts for each sub element when creating elements besides the final assignment value. doing something like a.b.c[0] = 12 where 'c' doesn't exist raises an exception add test cases to cover: access path that differs from existing object create new objects with an embedded list in the path create new object with a list at the end (define the end list in the passed in 'value' to avoid this exception)
2017-02-23Merge pull request #3406 from sdodson/openshift_reposScott Dodson
Install repos on containerized hosts for python dependencies
2017-02-22fix up ruamel.yaml/pyyaml no-member lint errorsJason DeTiberus