Guest User

Untitled

a guest
Apr 9th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. - hosts: localhost
  2. remote_user: user
  3. become: yes
  4.  
  5. vars:
  6. test_user: testuser
  7. test_group: testgroup
  8. test_user_password: somepassword
  9.  
  10. tasks:
  11. - name: Creating Group for testuser
  12. group:
  13. name: "{{ test_group }}"
  14. state: present
  15.  
  16. - name: Creating testuser
  17. user:
  18. name: "{{ test_user }}"
  19. password: "{{ test_user_password | password_hash('sha512') }}"
  20. shell: /bin/bash
  21. group: "{{ test_group }}"
  22. update_password: on_create
  23.  
  24. - name: Creating testuser
  25. user:
  26. name: "{{ test_user }}"
  27. password: "{{ test_user_password | password_hash('sha512', test_user_salt) }}"
  28. shell: /bin/bash
  29. group: "{{ test_group }}"
  30. update_password: on_create
Add Comment
Please, Sign In to add comment