sources.yml 818 B

1234567891011121314151617181920212223
  1. ---
  2. - name: sources | Load users db from a path
  3. load_user_files:
  4. args:
  5. path: "{{ usermanage_user_source_files }}"
  6. fact: "{{ usermanage_source_facts }}"
  7. databag: "{{ usermanage_user_source_databag }}"
  8. register: loaded_users_db
  9. connection: local
  10. sudo: no
  11. when: usermanage_user_source_files is defined and usermanage_user_source_files is not none
  12. - name: sources | Compile effective users
  13. usersdb:
  14. usersdb: "{{ usermanage_usersdb | default(omit) }}"
  15. serversdb: "{{ usermanage_servers | default(omit) }}"
  16. teamsdb: "{{ usermanage_teamsdb | default(omit) }}"
  17. source_userdb: "{{ loaded_users_db[usermanage_source_facts] | default(omit) }}"
  18. register: cuser
  19. connection: local
  20. sudo: no
  21. when: usermanage_usersdb is defined or loaded_users_db[usermanage_source_facts] is defined