diff options
author | Petr OspalĂ˝ <p.ospaly@partner.samsung.com> | 2019-04-08 08:39:41 +0200 |
---|---|---|
committer | Michal Ptacek <m.ptacek@partner.samsung.com> | 2019-04-24 14:04:17 +0000 |
commit | 3a6558a1af5ba14bc6614d94f768dd1a1fc86d9b (patch) | |
tree | 9c442934b9dbe7dfb5eedc25b27652265a043d79 /ansible/roles/rancher/tasks/rancher_server.yml | |
parent | 72b09b1a46200b6544600ff2432693f0b43c3918 (diff) |
Add support for resetting the admin password
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>
Diffstat (limited to 'ansible/roles/rancher/tasks/rancher_server.yml')
-rw-r--r-- | ansible/roles/rancher/tasks/rancher_server.yml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ansible/roles/rancher/tasks/rancher_server.yml b/ansible/roles/rancher/tasks/rancher_server.yml index e93dd0e0..4cda3722 100644 --- a/ansible/roles/rancher/tasks/rancher_server.yml +++ b/ansible/roles/rancher/tasks/rancher_server.yml @@ -48,6 +48,7 @@ rancher_agent_image: "{{ env.data.registration_tokens.image }}" rancher_agent_reg_url: "{{ env.data.registration_tokens.reg_url }}" +# By default disabled - when enabled this playbook cannot be run more than once. - name: Setup rancher admin password and enable authentication rancher1_api: server: "{{ rancher_server_url }}" @@ -56,6 +57,7 @@ data: account_id: 1a1 # default rancher admin account password: "{{ rancher.admin_password }}" + when: "rancher.auth_enabled is defined and rancher.auth_enabled" - name: Configure the size of the rancher cattle db and logs block: |