您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

29 行
683B

  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:
  13. - root_ssh_key
  14. - not root_target_directory is defined
  15. - name: root user ssh directory
  16. file:
  17. path: "{{ root_target_directory | default('') }}/root/.ssh"
  18. state: directory
  19. when: root_ssh_authorized_keys is defined
  20. - name: root user ssh authorized keys
  21. template:
  22. src: root_user_ssh_authorized_keys.j2
  23. dest: "{{ root_target_directory | default('') }}/root/.ssh/authorized_keys"
  24. when: root_ssh_authorized_keys is defined