Skip to content

Commit

Permalink
Add ansible step for DS setup
Browse files Browse the repository at this point in the history
In CI test using ansible, after DS setup the following operation fails
because DS is not ready and the authentication bind get error.

An additional step to repeat the connection until the bind
authentication succeed is added after DS configuration.
  • Loading branch information
fmarco76 authored and edewata committed Jun 19, 2024
1 parent 2967696 commit 8e8d7a7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ocsp-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ jobs:
- name: Execute OCSP playbook
run: |
ansible-playbook -e 'pki_subsystem="ocsp"' tests/ansible/pki-playbook.yml
ansible-playbook -e 'pki_subsystem="ocsp"' tests/ansible/pki-playbook.yml
env:
ANSIBLE_CONFIG: ${{ github.workspace }}/tests/ansible/ansible.cfg
11 changes: 11 additions & 0 deletions tests/ansible/est/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@
container: "{{ ds_container }}"
command: dsconf slapd-localhost backend create --suffix dc=example,dc=com --be-name userRoot

- name: Check ds connection
community.docker.docker_container_exec:
container: "{{ ds_container }}"
command: ldapsearch -H ldap://{{ ds_hostname }}:3389 -D "cn=Directory Manager" -w {{ ds_password }} -x -b dc=example,dc=com
register: ds_connection
retries: 5
delay: 15
failed_when: ds_connection.rc != 32 and ds_connection.rc != 49
until: ds_connection.rc == 32


- name: Add base entry
community.docker.docker_container_exec:
container: "{{ ds_container }}"
Expand Down
20 changes: 20 additions & 0 deletions tests/ansible/ocsp/tasks/certificate_self_validation_with_crl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@
- sed -i -e "s/;self_sign_cert = .*/self_sign_cert = True/g" ds.inf
- dscreate from-file ds.inf

- name: Check CA ds connection
community.docker.docker_container_exec:
container: "{{ cads_container }}"
command: ldapsearch -H ldap://{{ cads_hostname }}:3389 -D "cn=Directory Manager" -w {{ cads_password }} -x -b dc=example,dc=com
register: cads_connection
retries: 5
delay: 15
failed_when: cads_connection.rc != 32 and cads_connection.rc != 49
until: cads_connection.rc == 32

- name: Add CA base entry
community.docker.docker_container_exec:
container: "{{ cads_container }}"
Expand Down Expand Up @@ -140,6 +150,16 @@
- sed -i -e "s/;self_sign_cert = .*/self_sign_cert = True/g" ds.inf
- dscreate from-file ds.inf

- name: Check OCSP ds connection
community.docker.docker_container_exec:
container: "{{ ocspds_container }}"
command: ldapsearch -H ldap://{{ ocspds_hostname }}:3389 -D "cn=Directory Manager" -w {{ ocspds_password }} -x -b dc=example,dc=com
register: ocspds_connection
retries: 5
delay: 15
failed_when: ocspds_connection.rc != 32 and ocspds_connection.rc != 49
until: ocspds_connection.rc == 32


- name: Add OCSP base entry
community.docker.docker_container_exec:
Expand Down

0 comments on commit 8e8d7a7

Please sign in to comment.