# file: directory_servers.yaml
#
# Directory service nodes
#
---

- hosts: directory_servers
  roles:
    - role: guest_dmz
      tags: [ 'net' ]

    - role: libvirt_guest_network_service
      tags: [ 'net' ]

    - role: ca_trust
      tags: [ 'tls' ]

#    - role: transport_layer_security
#      tags: [ 'tls' ]

    - role: certbot_standalone
      tags: [ 'tls' ]

    - role: "{{ playbook_dir | dirname }}/service_commons_ansible/roles/updates_auto"
      tags: [ 'os' ]

    - role: 389-ds
      tags: [ 'ds' ]

#    - ldap_server

# TODO: LDAP backup

# file: directory_servers.yaml
#
# Directory service nodes
#
---

- hosts: directory_servers

  pre_tasks:

  - assert:
      that:
      - public_hostname is defined
      - public_dns_zone is defined
      - ds_config_admin_password is defined
      - ds_rootdn_password is defined
      - ds_admin_password is defined
      - firewall_zone is defined
      - public_ipv4_address is defined

  roles:
    - role: guest_dmz
      tags: [ 'net' ]

    - role: libvirt_guest_network_service
      tags: [ 'net' ]

    - role: ca_trust
      tags: [ 'tls' ]

#    - role: transport_layer_security
#      tags: [ 'tls' ]

    - role: certbot_standalone
      tags: [ 'tls' ]

    - role: "{{ playbook_dir | dirname }}/service_commons_ansible/roles/updates_auto"
      tags: [ 'os' ]

    - role: 389-ds
      tags: [ 'ds' ]

#    - ldap_server

# TODO: LDAP backup

Check configuration before directory server deployment
Check configuration before directory server deployment
