- hosts: odroid_cluster
  name: User creation
  vars:
    ansible_ssh_user: root
    ansible_ssh_pass: 1234
    myuser: "root"
    mypassword: "lacijaydee"
    mypassword2: "lacijaydee"
  tasks:
    - name: Change password
      ansible.builtin.user:
        name: "{{ myuser }}"
        state: present
        shell: /bin/bash
        expires: -1
        password: "{{ mypassword | password_hash('sha512') }}"
    - name: Set locale
      community.general.locale_gen:
        name: en_US.UTF-8
        state: present
    - name: Create password
      ansible.builtin.user:
        name: "jd"
        state: present
        expires: -1
        password: "{{ mypassword2 | password_hash('sha512') }}"
        shell: /bin/bash
    - name: Allow the jd user to run any commands
      community.general.sudoers:
        name: jd as sudo
        state: present
        user: jd
        nopassword: true
        commands: ALL
    - name: Set timezone to Europe/Bratislava
      community.general.timezone:
        name: Europe/Bratislava
    - name: Remove first login file
      ansible.builtin.file:
        state: absent
        path: /root/.not_logged_in_yet
    - name: Reconfigure logo
      ansible.builtin.lineinfile:
        path: /boot/armbianEnv.txt
        line: "disp_mode=800x480"
      

