---

- hosts: lockss
  become: true
  vars:
    minimum_memory_mb: 4096
    lockss_db_password:
      "{{ lookup('password',
                 playbook_dir + '/.vagrant/provisioners/ansible/creds/' +
                 'lockss_db-' + inventory_hostname +
                 ' chars=ascii_letters,digits') }}"
    lockss_ui_password:
      "{{ lookup('password',
                 playbook_dir + '/.vagrant/provisioners/ansible/creds/' +
                 'lockss_ui-' + inventory_hostname +
                 ' chars=ascii_letters,digits length=10') }}"
    lockss_hostname: "{{ hostname }}"
    lockss_ipaddr: "{{ external_ip }}"
    lockss_external_ipaddr: "{{ external_ip }}"
    lockss_network_ips:
      - 192.168.20.1
    lockss_admin_ips:
      - 192.168.20.1
    lockss_admin_email: root@localhost
  roles:
    - minimum_memory
    - system-tweaks-nepeta
    - lockss
  tasks:
    - debug:
        msg: "LOCKSS UI password: {{ lockss_ui_password }}"
