Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

root_user.yaml 576B

123456789101112131415161718192021222324252627
  1. ---
  2. - name: root user password
  3. user:
  4. name: root
  5. password: "{{ root_password }}"
  6. when: root_password is defined
  7. - name: root user ssh key
  8. user:
  9. name: root
  10. generate_ssh_key: yes
  11. ssh_key_type: ed25519
  12. when: root_ssh_key
  13. - name: root user ssh directory
  14. file:
  15. path: /root/.ssh
  16. state: directory
  17. mode: 0700
  18. when: root_ssh_authorized_keys is defined
  19. - name: root user ssh authorized keys
  20. copy:
  21. content: "{{ root_ssh_authorized_keys | join('\n') }}"
  22. dest: /root/.ssh/authorized_keys
  23. when: root_ssh_authorized_keys is defined