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 committed Jun 13, 2024
1 parent 97dfad4 commit b9c9f86
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 @@ -87,7 +87,7 @@ 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

Expand Down
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 @@ -43,6 +43,16 @@
container: "{{ cads_container }}"
command: dsconf slapd-localhost backend create --suffix dc=example,dc=com --be-name userRoot

- 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 @@ -138,6 +148,16 @@
container: "{{ ocspds_container }}"
command: dsconf slapd-localhost backend create --suffix dc=example,dc=com --be-name userRoot

- 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 b9c9f86

Please sign in to comment.