You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
1018 B

8 years ago
  1. ---
  2. - name: gather os specific variables
  3. include_vars: "{{ item }}"
  4. with_first_found:
  5. - files:
  6. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
  7. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
  8. - "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
  9. - "{{ ansible_distribution|lower }}.yml"
  10. - "{{ ansible_os_family|lower }}.yml"
  11. - defaults.yml
  12. paths:
  13. - ../vars
  14. skip: true
  15. - name: User | Create User Group
  16. group: name={{item.group|default(item.name)}} system={{item.system|default(omit)}}
  17. with_items: addusers
  18. - name: User | Create User
  19. user:
  20. comment: "{{item.comment|default(omit)}}"
  21. createhome: "{{item.create_home|default(omit)}}"
  22. group: "{{item.group|default(item.name)}}"
  23. home: "{{item.home|default(omit)}}"
  24. name: "{{item.name}}"
  25. system: "{{item.system|default(omit)}}"
  26. with_items: addusers