summaryrefslogtreecommitdiffstats
path: root/ansible/library
AgeCommit message (Collapse)AuthorFilesLines
2021-04-13[ANSIBLE 3.2.0] Upgrade 'dns' role's tasks to ansible 3.2.0Bartek Grzybowski1-1/+1
Change-Id: I6984396d15d0592313978c751fd109ee06d8febf Issue-ID: OOM-2722 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-07-29Fix linting issues in Python scriptsBartek Grzybowski1-1/+0
Change-Id: I198340670f808d42aa6fb16de573db4a65005985 Issue-ID: INT-1667 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-26Cleanup Rancher containers after Molecule convergeBartek Grzybowski1-0/+99
Rancher role test do remove rancher/agent and rancher/server containers at 'cleanup' stage but Rancher Agent spawned containers are left orphaned. This patch adds tasks to remove them. This patch also adds custom ansible module for listing docker containers (as of ansible 2.7.10 no upstream module provides that feature, even new docker_container_info info module in ansible's devel branch doesn't have it) Change-Id: I6325dc81063b55b70136280273f8f6138c7a0375 Issue-ID: OOM-1811 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2019-04-24Add support for resetting the admin passwordPetr Ospalý1-41/+101
The module rancher1_api can now reset an admin password of the default admin account (account_id: '1a1') and keep local authentication enabled. By default the authentication is not enabled, because the ansible module rancher_k8s_environment.py is not idempotent and it would need to be rewritten. Change-Id: Ib432537651b91216c32438ec1233dba3602e3faf Issue-ID: OOM-1734 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-04-24Add support for rancher authenticationPetr Ospalý1-28/+216
This commit adds a new mode to the rancher1_api module, which enables the rancher local authentication (username/password). There is an already predefined rancher admin user called 'admin' and that is the account, which this mode modifies. Due to the complex API and the fact that rancher 1.6 is soon to be obsoleted, this module is going the simpler route and it is just editing this default admin account instead of creating a completely arbitrary username/password credentials. For that reason is using the 'account_id', which is unique for all accounts and the default admin account of rancher has '1a1'. As of now this module cannot handle changed password once the auth. is enabled. Change-Id: Iea8923c71bdb82267c966a00d62f0f43eb5adb76 Issue-ID: OOM-1734 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-04-17Refactor rancher1_api modulePetr Ospalý1-96/+204
This rewrite enables to add easier more features supported by the rancher API. The initial idea of a simple get and set through the JSON REST API is not feasible. To achieve something with the API one may have to setup more options on different URLs and in a particular order. For this reason the module comes with the mechanism of "modes", which is a wrapper around some feature in the rancher and which can require multiple steps to do. Rancher1_api module could also support "raw" mode where the user will not be limited by a few implemented modes in the module, but he can craft all requests by hand - but due to the fact that such thing can be done easily with just curl command and ansible shell module, there is no benefit in doing so. Especially when rancher 1.6 is already obsoleted within the ONAP. The useful value of this module is to give the user a simple means to set something in the rancher and hide all the boilerplate from him via a mode. - Original logic was rewritten to utilize the "mode" mechanism. - New module structure is also easier to test outside of ansible. Issue-ID: OOM-1681 Change-Id: I0e7932199df9ec1acd80af545060199867ad17fa Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-04-17Add support for rancher 1.6 APIPetr Ospalý1-0/+242
- New ansible module to handle rancher API - Setting up of the cattle db and log related options to achieve lower space usage. As of this moment it does what was intended: - it setups new values for db and log related options - it can be used for any other setting options Change-Id: I25048469df0cb035cc6eac39740210cdfa175ada Issue-ID: OOM-1681 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2019-03-18Add default logging settings for dockerPetr Ospalý2-90/+328
- Default configuration of logging for docker daemon. - New ansible module for generic handling of JSON files. - New setting in ansible.cfg: jinja2_native = True To preserve double-quotes in json values (OOM-1698). Issue-ID: OOM-1681 Change-Id: I8f8e19ebc290fd48a63146e96f418b98344e4433 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2018-12-19Add ansible library for creating the k8n env.Petr Ospalý1-0/+341
Issue-ID: OOM-1551 Change-Id: I485f58e560086345bd27a4a7f94d2651a0cd357e Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>
2018-12-19Add ansible library to modify jsonPetr Ospalý1-0/+90
Issue-ID: OOM-1551 Change-Id: I791bf7163a023ddc140cee22d474fcf532beae17 Signed-off-by: Petr Ospalý <p.ospaly@partner.samsung.com>