summaryrefslogtreecommitdiffstats
path: root/roles/lib_utils
Commit message (Collapse)AuthorAgeFilesLines
* Adding ability to yedit json files.Kenny Woodson2018-02-133-14/+38
|
* Merge pull request #7106 from jarrpa/pvc-gen-storageclassOpenShift Merge Robot2018-02-131-1/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Allow for blank StorageClass in PVC creationJose A. Rivera2018-02-121-1/+7
| | | | | | | | | | | | | | | | 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>
* | Merge pull request #7113 from mgugino-upstream-stage/fix-etcd-scaleup-sanityMichael Gugino2018-02-121-1/+18
|\ \ | | | | | | Fix etcd scaleup plays
| * | Fix etcd scaleup playsMichael Gugino2018-02-121-1/+18
| |/ | | | | | | | | | | | | | | | | | | | | 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
* / Verify that requested services have schedulable nodes matching the selectorsVadim Rutkovsky2018-02-101-1/+47
|/ | | | Signed-off-by: Vadim Rutkovsky <vrutkovs@redhat.com>
* Merge pull request #6926 from abutcher/etcd-ca-hostScott Dodson2018-02-081-1/+1
|\ | | | | Determine which host is the etcd CA host
| * lib_utils_oo_collect: Allow filtering on dot separated keys.Andrew Butcher2018-02-011-1/+1
| |
* | Initial support for 3.10Scott Dodson2018-02-054-10/+14
|/
* Merge pull request #6919 from mfojtik/symlink-kubectl-to-ocOpenShift Merge Robot2018-01-301-1/+1
|\ | | | | | | | | | | | | | | | | 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
| * Symlink kubectl to oc instead of openshiftMichal Fojtik2018-01-291-1/+1
| |
* | docker_creds: decode docker_config for py3 only if its a stringVadim Rutkovsky2018-01-301-1/+3
| |
* | Merge pull request #6859 from abutcher/bz1536217OpenShift Merge Robot2018-01-251-0/+53
|\ \ | | | | | | | | | | | | Automatic merge from submit-queue. Bug 1536217: Need to validate etcd serving certs before 3.9 upgrade
| * | Redeploy etcd certificates during upgrade when etcd hostname not present in ↵Andrew Butcher2018-01-241-0/+53
| | | | | | | | | | | | etcd serving cert SAN.
* | | [1502838] Correct certificate alt name parsingRussell Teague2018-01-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Create swapoff moduleMichael Gugino2018-01-241-0/+137
| | | | | | | | | | | | | | | Create custome ansible module 'swapoff' to idempotently disable swap in /etc/fstab and also run swapoff.
* | | Merge pull request #6603 from joelddiaz/fetch_subnet_azOpenShift Merge Robot2018-01-241-0/+16
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | un-hardcode default subnet azJoel Diaz2018-01-221-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #6682 from giuseppe/fix-registriesMichael Gugino2018-01-231-2/+2
|\ \ \ \ | |_|_|/ |/| | | CRI-O, Docker: Use images from the CentOS and Fedora registry
| * | | docker_creds: fix python3 exceptionGiuseppe Scrivano2018-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: Object of type 'bytes' is not JSON serializable Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
| * | | docker_creds: fix python3 exceptionGiuseppe Scrivano2018-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Solves this exception with python3: TypeError: a bytes-like object is required, not 'str Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* | | | Add ability to mount volumes into system container nodesMichael Gugino2018-01-181-0/+14
| |_|/ |/| | | | | | | | | | | | | | | | | This commit adds the ability to mount volumes into system containerized nodes. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1534933
* | | Don't use from ansible.module_utils.six as its no longer available in ↵Vadim Rutkovsky2018-01-122-12/+5
| |/ |/| | | | | Ansible 2.4
* | Move more plugins to lib_utilsMichael Gugino2018-01-1018-0/+3258
|/ | | | | | | This commit continues moving plugins into lib_utils. This commit does not move any plugins for add-on roles such as logging and metrics.
* Refactor version and move some checks into sanity_checks.pyMichael Gugino2018-01-091-1/+56
| | | | | | | | | | | | | 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.
* Migrate to import_role for static role inclusionScott Dodson2018-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Remove references to deployment_typeMichael Gugino2017-12-211-1/+17
| | | | | | | Move openshift_deployment_type check into sanity_check action plugin. Remove compatibility for deployment_type. deployment_type has been deprecated for some time now.
* Move validate_hosts to prerequisites.ymlMichael Gugino2017-12-201-1/+15
| | | | | | Move more checks outside of init/main.yml for speeding up upgrades and other operational plays that need to run.
* Move sanity_checks into custom action pluginMichael Gugino2017-12-201-0/+96
| | | | | | | 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
* Relocate filter plugins to lib_utilsMichael Gugino2017-12-187-0/+1601
| | | | | | | | | | | | | | 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.
* Copying upstream fix for ansible 2.4 ec2_group module.Kenny Woodson2017-12-111-0/+903
|
* Alternative method to create docker registry auth credsMichael Gugino2017-11-141-0/+207
| | | | | | | | | | | | | | | 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
* Returning actual results of yedit query. Empty list was returning empty dict.Kenny Woodson2017-09-202-2/+2
|
* add retry on repoquery_cmdLuke Meyer2017-09-131-1/+1
|
* add retries to repoquery moduleLuke Meyer2017-09-134-12/+25
|
* First attempt at provisioning.Kenny Woodson2017-08-213-1/+486
|
* Fix python3 error in repoqueryJeff Peeler2017-05-133-3/+3
| | | | | | | Explicitly convert from bytes to string so that splitting the string is successful. This change works with python 2 as well. Closes #4182
* Merge pull request #4065 from ingvagabund/introduce-get-rpm-version-roleJan Chaloupka2017-05-126-4/+58
|\ | | | | Introduce excluder-free rpm version detection role
| * Extend repoquery command (of lib_utils role) to ignore excludersJan Chaloupka2017-05-116-4/+58
| |
* | Fix for yedit custom separatorsMatt Woodson2017-05-102-2/+2
|/
* Fixed a bug in oc_volume.Kenny Woodson2017-03-284-94/+76
|
* Adding a few more test cases. Fixed a bug when key was empty. Safeguard ↵Kenny Woodson2017-03-285-19/+132
| | | | against yedit module being passed an empty key
* Added the ability to do multiple editsKenny Woodson2017-03-285-111/+242
|
* Remove dummy setup/teardown methodsRodolfo Carvalho2017-03-061-8/+0
|
* Clean up test filesRodolfo Carvalho2017-03-062-24/+0
| | | | | They are not executable anymore, and tests are now meant to be run through pytest.
* Remove redundant assertionRodolfo Carvalho2017-03-061-2/+0
| | | | | | 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.
* BZ1422348 - Don't install python-ruamel-yamlScott Dodson2017-03-032-12/+1
| | | | Just rely on PyYAML as a fallback and hope that's there
* raise exceptions when walking through object pathJoel Diaz2017-02-283-5/+38
| | | | | | | | | | | | | | | | 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)
* Merge pull request #3406 from sdodson/openshift_reposScott Dodson2017-02-231-0/+15
|\ | | | | Install repos on containerized hosts for python dependencies
| * add dependency on openshift_reposScott Dodson2017-02-171-0/+15
| |