Add support for rancher authentication 71/84471/5
authorPetr Ospalý <p.ospaly@partner.samsung.com>
Mon, 8 Apr 2019 02:55:47 +0000 (04:55 +0200)
committerMichal Ptacek <m.ptacek@partner.samsung.com>
Wed, 24 Apr 2019 14:03:19 +0000 (14:03 +0000)
commit72b09b1a46200b6544600ff2432693f0b43c3918
treec0cc18c0c98c0a80b5d273f188b458cc4d307d89
parent9dee2011bf2eeddf43c4479935a5219c818e1cfb
Add support for rancher authentication

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>
ansible/library/rancher1_api.py
ansible/roles/rancher/defaults/main.yml
ansible/roles/rancher/tasks/rancher_server.yml