Playbooks to a new Lilik
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

  1. ---
  2. # 1) Deploy the lxc container(s)
  3. - hosts: ldap
  4. # The host may not exist yet: do not gather facts
  5. gather_facts: false
  6. tags:
  7. - lxc
  8. tasks:
  9. # Delegate lxc container deployment to `ansible_lxc_host`
  10. - import_role: name='lxc_guest'
  11. vars:
  12. vm_name: '{{ inventory_hostname }}'
  13. vm_size: '1G'
  14. vg_name: '{{ hostvars[ansible_lxc_host]["vg_name"] }}'
  15. delegate_to: '{{ ansible_lxc_host }}'
  16. # The host may not be directly reachable: use `ssh_lxc` proxy to
  17. # gather facts (setup) and configure SSH.
  18. - set_fact: ansible_connection='ssh_lxc'
  19. - setup:
  20. - include_role: name='ssh_server'
  21. # Now the host should be ssh-reachable
  22. - set_fact: ansible_connection='ssh'
  23. # 2) Deploy LDAP server(s)
  24. - hosts: ldap
  25. roles:
  26. - role: dns_record
  27. - role: ldap
  28. ldap_domain: 'lilik.it'
  29. ldap_organization: 'LILiK'
  30. fqdn_domain: 'dmz.{{ domain }}'
  31. x509_suffix: 'o=LILiK,l=Firenze,st=IT'
  32. virtual_domains:
  33. - '{{ domain }}'
  34. # Default values:
  35. #ldap_tls_enabled: true
  36. #renew_rootdn_pw: true
  37. #check_tree: true
  38. # 3) Enable monitoring
  39. - hosts: status
  40. roles:
  41. - role: icinga2-monitoring