您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
658B

  1. ---
  2. - name: primary group
  3. group:
  4. name: "{{ item }}"
  5. gid: "{{ users[item].gid }}"
  6. with_items: "{{ users.keys() }}"
  7. when: users[item].gid is defined
  8. - name: account
  9. user:
  10. name: "{{ item }}"
  11. group: "{{ item }}"
  12. groups: "{{ users[item].groups | default([]) | join(',') }}"
  13. uid: "{{ users[item].uid }}"
  14. home: "{{ users[item].home | default('/home/'+item) }}"
  15. shell: "{{ users[item].shell | default('/usr/bin/fish') }}"
  16. with_items: "{{ users.keys() }}"
  17. - name: password
  18. user:
  19. name: "{{ item }}"
  20. password: "{{ users[item].password }}"
  21. with_items: "{{ users.keys() }}"
  22. when: users[item].password is defined