Files @ 6f26ccefa724
Branch filter:

Location: majic-ansible-roles/testsite/playbooks/ldap.yml

branko
MAR-151: Added support for Debian 10 Buster to php_website role:

- Updated role reference documentaiton.
- Updated role meta information.
- Updated tests.
- Refactor the code to take into account differences in PHP-related
paths between Debian Stretch and Debian Buster.
- Make the test for web application user less dependant on what the
actual UID number is in case of default value. By default user
should be created as system user, which means its UID number should
be less than 1000.
- Drop the installation of libmariadbclient-dev-compat library - the
test is good enough without it, and the actual package is
differently named under Debian Stretch and Debian Buster (which
would complicate the test without any benefits).
---

- hosts: ldap
  remote_user: ansible
  become: true
  roles:
    - common
    - mail_forwarder
    - ldap_client
    - ldap_server

- hosts: ldap
  remote_user: ansible
  become: true
  tasks:

    - name: Add users to mail LDAP group
      ldap_attr:
        dn: "cn=mail,ou=groups,{{ testsite_ldap_base }}"
        name: uniqueMember
        values:
          - "uid=johndoe,ou=people,{{ testsite_ldap_base }}"
          - "uid=janedoe,ou=people,{{ testsite_ldap_base }}"
        state: present

    - name: Add user to XMPP LDAP group
      ldap_attr:
        dn: "cn=xmpp,ou=groups,{{ testsite_ldap_base }}"
        name: uniqueMember
        values:
          - "uid=johndoe,ou=people,{{ testsite_ldap_base }}"
          - "uid=janedoe,ou=people,{{ testsite_ldap_base }}"
        state: present