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.

71 lines
2.4 KiB

style and variables refactoring - Coherent quotation style Single quotes for text variable (even if implicit), no quotes for variable and conditional statements, if not required. - Some useful tags added: * ssh_certs renewal of server SSH certificates and configuration of authorized CA. * tls_pub renewal of public TLS certificates (let's encrypt) and certbot configuration. * tls_int renewal of internal TLS certificates (service authorizations) and configuration of authorized internal CA. *(ToDo: deployment of Certificate Revokation Lists)* * lxc deployment of new containers (deployment of configuration file excluded, for instance change in ip address are always applied and trigger a container restart even if you skip this tag. * packages installation and upgrade of software packages (apt, opkg or tarballs) * service_password create new random password for services-only password, for routine rotation. Not meant to be skipped (some roles need to know the service password, so they do a rotation). - prepare_host - ssh_server - lxc_guest - ldap - gitlab - x509_subject_prefix - x509_ldap_suffix *Replaces:* x509_suffix in ldap.yaml - letsencrypt_email Used in roles/certbot and roles/gitlab - root_ca_cert *Replaces:* ssl_ca_cert and files/lilik_x1.crt New defaults: - ldap_domain | default: `${domain}` - server_fqdn | default: `${hostname}.dmz.${domain}` *Replaces:* fqdn_domain Removed: - fqdn_dmain - x509_suffix *Replaced by:* x509_ldap_suffix in common New defaults: - server_fqdn | default: `${hostname}.${domain}` *Replaces*: fqdn - ldap_domain | default: `${domain}` - ldap_server | default: `ldap1.dmz.${domain}` - ldap_basedn | default: `dn(${ldap_domain})` - enable_https | default: `true` New defaults: - server_fqdn | default: `${hostname}.${domain}`
5 years ago
style and variables refactoring - Coherent quotation style Single quotes for text variable (even if implicit), no quotes for variable and conditional statements, if not required. - Some useful tags added: * ssh_certs renewal of server SSH certificates and configuration of authorized CA. * tls_pub renewal of public TLS certificates (let's encrypt) and certbot configuration. * tls_int renewal of internal TLS certificates (service authorizations) and configuration of authorized internal CA. *(ToDo: deployment of Certificate Revokation Lists)* * lxc deployment of new containers (deployment of configuration file excluded, for instance change in ip address are always applied and trigger a container restart even if you skip this tag. * packages installation and upgrade of software packages (apt, opkg or tarballs) * service_password create new random password for services-only password, for routine rotation. Not meant to be skipped (some roles need to know the service password, so they do a rotation). - prepare_host - ssh_server - lxc_guest - ldap - gitlab - x509_subject_prefix - x509_ldap_suffix *Replaces:* x509_suffix in ldap.yaml - letsencrypt_email Used in roles/certbot and roles/gitlab - root_ca_cert *Replaces:* ssl_ca_cert and files/lilik_x1.crt New defaults: - ldap_domain | default: `${domain}` - server_fqdn | default: `${hostname}.dmz.${domain}` *Replaces:* fqdn_domain Removed: - fqdn_dmain - x509_suffix *Replaced by:* x509_ldap_suffix in common New defaults: - server_fqdn | default: `${hostname}.${domain}` *Replaces*: fqdn - ldap_domain | default: `${domain}` - ldap_server | default: `ldap1.dmz.${domain}` - ldap_basedn | default: `dn(${ldap_domain})` - enable_https | default: `true` New defaults: - server_fqdn | default: `${hostname}.${domain}`
5 years ago
  1. # Role: gitlab
  2. Set-up a Omnibus GitLab server
  3. ## Configuration variables
  4. | Name | Description |
  5. |--------------------------------|-------------------------------------------------|
  6. | `host_fqdn` | [`$hostname.dmz.$domain`] |
  7. | `gitlab_ssh_port` | External SSH port. [`22`] |
  8. | `ldap_server` | LDAP server fqdn [`'ldap1.dmz.$domain'`] |
  9. | `ldap_tls_server_ca` | [`$tls_root_ca`] |
  10. | `ldap_domain` | LDAP domain, used to derive base dn [`$domain`] |
  11. | `gitlab_enable_https` | Enable HTTPS. [`false`] |
  12. | `gitlab_enable_mattermost` | |
  13. | `gitlab_nginx_main_fqdn` | [`$hostname.$domain`] |
  14. | `gitlab_nginx_mattermost_fqdn` | [`mattermost.$domain`] |
  15. | `gitlab_nginx_proxy_protocol` | [`true`] |
  16. | `ldap_admin_dn` | DN of a LDAP user with admin privileges. |
  17. | `ldap_admin_pw` | Bind password of that user. |
  18. | `gitlab_initial_root_password` | Available only before initialization. |
  19. **Note**: The Ansible controller must have OpenLDAP properly configured
  20. with root ca set in `~/.ldaprc`.
  21. ## Minimal example
  22. group_vars/all.yaml:
  23. ---
  24. domain: 'example.com'
  25. user_ca_keys:
  26. - "ssh-ed25519 ################### CA"
  27. tls_root_ca: |
  28. -----BEGIN CERTIFICATE-----
  29. ###########################
  30. -----END CERTIFICATE-----
  31. hosts:
  32. vm_gateway ansible_host=10.0.2.1 ansible_user=root
  33. authorities_request ansible_host=10.0.1.8 ansible_user=request
  34. host1 ansible_host=10.0.1.1 ansible_user=root
  35. ldap1 ansible_host=10.0.2.2 ansible_user=root ansible_lxc_host=host1
  36. gitlab ansible_host=10.0.2.3 ansible_user=root ansible_lxc_host=host1
  37. playbook.yaml:
  38. ---
  39. # Configure GitLab on a Physical Host
  40. - hosts: 'host1'
  41. roles:
  42. - role: 'dns_record'
  43. - role: 'reverse_proxy'
  44. hostname: 'projects'
  45. - role: 'gitlab'
  46. Command line:
  47. ansible-playbook -i hosts playbook.yaml \
  48. -e ldap_admin_dn=<admin_dn> -e \
  49. -e ldap_amdin_pw=<admin_pw>
  50. ## Requirements
  51. On Ansible controller:
  52. - tasks/ca-dialog.yaml