Skip to content

Commit

Permalink
add a flag for enabling/disabling certificate deployment (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Coutadeur authored and davidcoutadeur committed Dec 3, 2024
1 parent 9f71665 commit 99aaf0d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Defaults variables for OpenLDAP role
################################################################################

# Deploy certificate
ldaptoolbox_openldap_deploy_certificates: false


# apt package repository
ldaptoolbox_openldap_apt_key_url: "https://ltb-project.org/documentation/_static/RPM-GPG-KEY-LTB-project"
Expand Down
2 changes: 2 additions & 0 deletions playbook/multimaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# include extra schema
- ldaptoolbox_openldap_custom_schema_srcdir: "{{ playbook_dir }}/files/ldaptoolbox.oldap/usr/local/openldap/etc/openldap/schema"
- ldaptoolbox_openldap_custom_schema_list: [ custom.ldif ]
# Deploy certificates
- ldaptoolbox_openldap_deploy_certificates: true
- ldaptoolbox_openldap_olcTLSCACertificateFile: "{{ '/usr/local/openldap/etc/openldap/certs/ca.crt' }}"
- ldaptoolbox_openldap_olcTLSCertificateFile: "{{ '/usr/local/openldap/etc/openldap/certs/openldap.crt' }}"
- ldaptoolbox_openldap_olcTLSCertificateKeyFile: "{{ '/usr/local/openldap/etc/openldap/certs/openldap.key' }}"
Expand Down
1 change: 1 addition & 0 deletions playbook/standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- ldaptoolbox_openldap_custom_schema_srcdir: "{{ playbook_dir }}/files/ldaptoolbox.oldap/usr/local/openldap/etc/openldap/schema"
- ldaptoolbox_openldap_custom_schema_list: [ custom.ldif ]
# deploy certificates
- ldaptoolbox_openldap_deploy_certificates: true
- ldaptoolbox_openldap_olcTLSCACertificateFile: "{{ '/usr/local/openldap/etc/openldap/certs/ca.crt' }}"
- ldaptoolbox_openldap_olcTLSCertificateFile: "{{ '/usr/local/openldap/etc/openldap/certs/openldap.crt' }}"
- ldaptoolbox_openldap_olcTLSCertificateKeyFile: "{{ '/usr/local/openldap/etc/openldap/certs/openldap.key' }}"
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

- name: setup certificates
include_tasks: ldaptoolbox-certificates.yml
when: ldaptoolbox_openldap_deploy_certificates|bool == true

# Configuration
# -------------
Expand Down

0 comments on commit 99aaf0d

Please sign in to comment.