mirror of
https://github.com/openshift/community.okd.git
synced 2026-03-26 19:03:14 +00:00
* Upgrade Ansible and OKD versions for CI * Use ubi9 and fix sanity * Use correct pip install * Try using quotes * Ensure python3.9 * Upgrade ansible and molecule versions * Remove DeploymentConfig DeploymentConfigs are deprecated and seem to now be causing idempotence problems. Replacing them with Deployments fixes it. * Attempt to fix ldap integration tests Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Move sanity and unit tests to GH actions Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Firt round of sanity fixes Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add kubernetes.core collection as sanity requirement Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add ignore-2.16.txt Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Attempt to fix units Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add ignore-2.17 Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Attempt to fix unit tests Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add pytest-ansible to test-requirements.txt Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add changelog fragment Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add workflow for ansible-lint Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Apply black Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Fix linters Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Add # fmt: skip Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Yet another round of linting Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Yet another round of linting Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Remove setup.cfg Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Revert #fmt Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Use ansible-core 2.14 Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Cleanup ansible-lint ignores Signed-off-by: Alina Buzachis <abuzachis@redhat.com> * Try using service instead of pod IP * Fix typo * Actually use the correct port * See if NetworkPolicy is preventing connection * using Pod internal IP * fix adm prune auth roles syntax * adding some retry steps * fix: openshift_builds target * add flag --force-with-deps when building downstream collection * Remove yamllint from tox linters, bump minimum python supported version to 3.9, Remove support for ansible-core < 2.14 --------- Signed-off-by: Alina Buzachis <abuzachis@redhat.com> Co-authored-by: Mike Graves <mgraves@redhat.com> Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
---
|
|
- name: Get cluster information
|
|
kubernetes.core.k8s_cluster_info:
|
|
register: info
|
|
|
|
- name: Create LDAP Pod
|
|
community.okd.k8s:
|
|
namespace: "default"
|
|
wait: yes
|
|
definition:
|
|
kind: Pod
|
|
apiVersion: v1
|
|
metadata:
|
|
name: ldap-pod
|
|
labels:
|
|
app: ldap
|
|
spec:
|
|
containers:
|
|
- name: ldap
|
|
image: bitnami/openldap
|
|
env:
|
|
- name: LDAP_ADMIN_USERNAME
|
|
value: "{{ ldap_admin_user }}"
|
|
- name: LDAP_ADMIN_PASSWORD
|
|
value: "{{ ldap_admin_password }}"
|
|
- name: LDAP_USERS
|
|
value: "ansible"
|
|
- name: LDAP_PASSWORDS
|
|
value: "ansible123"
|
|
- name: LDAP_ROOT
|
|
value: "{{ ldap_root }}"
|
|
ports:
|
|
- containerPort: 1389
|
|
name: ldap-server
|
|
register: pod_info
|
|
|
|
- name: Set LDAP Common facts
|
|
set_fact:
|
|
# we can use the Pod IP directly because the integration are running inside a Pod in the
|
|
# same openshift cluster
|
|
ldap_server_uri: "ldap://{{ pod_info.result.status.podIP }}:1389"
|
|
ldap_bind_dn: "cn={{ ldap_admin_user }},{{ ldap_root }}"
|
|
ldap_bind_pw: "{{ ldap_admin_password }}"
|
|
|
|
- name: Display LDAP Server URI
|
|
debug:
|
|
var: ldap_server_uri
|
|
|
|
- name: Test existing user from LDAP server
|
|
openshift_ldap_entry_info:
|
|
bind_dn: "{{ ldap_bind_dn }}"
|
|
bind_pw: "{{ ldap_bind_pw }}"
|
|
dn: "ou=users,{{ ldap_root }}"
|
|
server_uri: "{{ ldap_server_uri }}"
|
|
register: test_ldap
|
|
retries: 10
|
|
delay: 5
|
|
until: test_ldap is not failed
|
|
|
|
- include_tasks: "tasks/python-ldap-not-installed.yml"
|
|
- include_tasks: "tasks/rfc2307.yml"
|
|
- include_tasks: "tasks/activeDirectory.yml"
|
|
- include_tasks: "tasks/augmentedActiveDirectory.yml"
|