Changeset - c89b5e6609a4
[Not reviewed]
0 5 0
Branko Majic (branko) - 2 years ago 2023-11-30 18:23:12
branko@majic.rs
MAR-189: Added support for Debian 11 Bullseye to ldap_client role.
5 files changed with 39 insertions and 2 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -574,12 +574,13 @@ Parameters
 
Distribution compatibility
 
~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
Role is compatible with the following distributions:
 

	
 
- Debian 10 (Buster)
 
- Debian 11 (Bullseye)
 

	
 

	
 
Examples
 
~~~~~~~~
 

	
 
Here is an example configuration for setting some common LDAP client options:
roles/ldap_client/meta/main.yml
Show inline comments
 
@@ -6,6 +6,7 @@ galaxy_info:
 
  license: BSD
 
  min_ansible_version: 2.9
 
  platforms:
 
    - name: Debian
 
      versions:
 
        - 10
 
        - 11
roles/ldap_client/molecule/default/molecule.yml
Show inline comments
 
@@ -11,26 +11,40 @@ lint:
 
  name: yamllint
 
  options:
 
    config-file: ../../.yamllint.yml
 

	
 
platforms:
 

	
 
  - name: parameters-mandatory-buster64
 
  - name: parameters-mandatory-buster
 
    groups:
 
      - parameters-mandatory
 
    box: debian/contrib-buster64
 
    memory: 256
 
    cpus: 1
 

	
 
  - name: parameters-optional-buster64
 
  - name: parameters-optional-buster
 
    groups:
 
      - parameters-optional
 
    box: debian/contrib-buster64
 
    memory: 256
 
    cpus: 1
 

	
 
  - name: parameters-mandatory-bullseye
 
    groups:
 
      - parameters-mandatory
 
    box: debian/bullseye64
 
    memory: 256
 
    cpus: 1
 

	
 
  - name: parameters-optional-bullseye
 
    groups:
 
      - parameters-optional
 
    box: debian/bullseye64
 
    memory: 256
 
    cpus: 1
 

	
 
provisioner:
 
  name: ansible
 
  config_options:
 
    defaults:
 
      force_valid_group_names: "ignore"
 
      interpreter_python: "/usr/bin/python3"
roles/ldap_client/molecule/default/tests/test_default.py
Show inline comments
 
@@ -12,12 +12,25 @@ def test_installed_packages(host):
 
    Tests if correct packages are installed.
 
    """
 

	
 
    assert host.package('ldap-utils').is_installed
 

	
 

	
 
def test_ldap_configuration_directory(host):
 
    """
 
    Tests if LDAP client configuration directory has been created.
 
    """
 

	
 
    config = host.file('/etc/ldap')
 

	
 
    assert config.is_directory
 
    assert config.user == 'root'
 
    assert config.group == 'root'
 
    assert config.mode == 0o755
 

	
 

	
 
def test_ldap_configuration_file(host):
 
    """
 
    Tests if LDAP configuration files has been deployed with correct
 
    permissions.
 
    """
 

	
roles/ldap_client/tasks/main.yml
Show inline comments
 
@@ -2,12 +2,20 @@
 

	
 
- name: Install OpenLDAP client tools
 
  apt:
 
    name: ldap-utils
 
    state: present
 

	
 
- name: Set-up LDAP client configuration directory
 
  file:
 
    path: /etc/ldap/
 
    state: directory
 
    owner: root
 
    group: root
 
    mode: 0755
 

	
 
- name: Deploy LDAP client configuration file
 
  template:
 
    src: ldap.conf.j2
 
    dest: /etc/ldap/ldap.conf
 
    owner: root
 
    group: root
0 comments (0 inline, 0 general)