diff options
author | Andrew Butcher <abutcher@redhat.com> | 2015-12-16 17:56:09 -0500 |
---|---|---|
committer | Andrew Butcher <abutcher@redhat.com> | 2016-01-04 09:16:11 -0500 |
commit | ef014ae06a50c5f2050aa183638165895154db5f (patch) | |
tree | 33255ae9e62f9551a83bf7586beefb322df5b13c /roles/openshift_master/tasks | |
parent | 9b760b0a89a77c5be0b3521a2c35b5afcb2a20d2 (diff) | |
download | openshift-ef014ae06a50c5f2050aa183638165895154db5f.tar.gz openshift-ef014ae06a50c5f2050aa183638165895154db5f.tar.bz2 openshift-ef014ae06a50c5f2050aa183638165895154db5f.tar.xz openshift-ef014ae06a50c5f2050aa183638165895154db5f.zip |
Secrets validation.
Diffstat (limited to 'roles/openshift_master/tasks')
-rw-r--r-- | roles/openshift_master/tasks/main.yml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/roles/openshift_master/tasks/main.yml b/roles/openshift_master/tasks/main.yml index 1c7fdfcf9..e6ddd1c49 100644 --- a/roles/openshift_master/tasks/main.yml +++ b/roles/openshift_master/tasks/main.yml @@ -11,11 +11,21 @@ # Session Options Validation - fail: - msg: "Both openshift_master_session_auth_secrets and openshift_master_session_encryption_secrets must be provided if either variable is set" + msg: > + Both openshift_master_session_auth_secrets and openshift_master_session_encryption_secrets must be provided if either variable is set when: (openshift_master_session_auth_secrets is defined and openshift_master_session_encryption_secrets is not defined) or (openshift_master_session_encryption_secrets is defined and openshift_master_session_auth_secrets is not defined) - fail: - msg: "openshift_master_session_auth_secrets and openshift_master_encryption_secrets must be equal length" + msg: > + openshift_master_session_auth_secrets and openshift_master_encryption_secrets must be equal length when: (openshift_master_session_auth_secrets is defined and openshift_master_session_encryption_secrets is defined) and (openshift_master_session_auth_secrets | length != openshift_master_session_encryption_secrets | length) +- fail: + msg: > + Invalid secret length in openshift_master_session_auth_secrets: secrets must be at least 32 characters + when: openshift_master_session_auth_secrets is defined and not openshift_master_session_auth_secrets | validate_auth_secrets | bool +- fail: + msg: > + Invalid secret length in openshift_master_session_encryption_secrets: secrets must be 16, 24, or 32 characters + when: openshift_master_session_encryption_secrets is defined and not openshift_master_session_encryption_secrets | validate_encryption_secrets | bool # HA Variable Validation - fail: |