add_lansweeper_user.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. ---
  2. - name: Add lansweeper user
  3. hosts: all
  4. gather_facts: false
  5. become: true
  6. tasks:
  7. - name: "import user data from userinfo file"
  8. include_vars:
  9. dir: "include/DataDog-TEST"
  10. #files_matching: "*.userinfo.yaml"
  11. ignore_unknown_extensions: True
  12. extensions: [ 'datatogtest', 'yaml' ]
  13. - name: "Add the lansweeper user with a specific uid, unusable password & public key. Also create home directory."
  14. user:
  15. name: "lansweeper"
  16. comment: "lansweeper user (added 10-16-2025)"
  17. shell: "/bin/bash"
  18. uid: "10810"
  19. update_password: always
  20. password_expire_min: -1
  21. state: present
  22. system: false
  23. - name: "Set ssh public RSA key for lansweeper user"
  24. authorized_key:
  25. user: "lansweeper"
  26. state: present
  27. key: 'ssh-rsa 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 RSA 2048-bit keypair for the lansweeper user (10-16-2025)'
  28. # with_file:
  29. # - include/DataDog-TEST/Ansible-id_ecdsa.pub
  30. # - include/DataDog-TEST/Ansible-id_ed25519.pub
  31. # - include/DataDog-TEST/Ansible-id_rsa.pub