Guest User

Untitled

a guest
Nov 30th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. : [robtest1] ;
  2. : [1639] root@chariotsoffire:~ # ; ansible-playbook --verbose /etc/ansible/playbooks/add_user/setup.yml
  3.  
  4. PLAY [all] *********************
  5.  
  6. GATHERING FACTS *********************
  7. ok: [deerhunter]
  8. ok: [chariotsoffire]
  9. ok: [kramervskramer]
  10. ok: [ordinarypeople]
  11.  
  12. TASK: [create_ssn] *********************
  13. ok: [chariotsoffire] => {"append": "no", "changed": true, "comment": "ssn", "group": 50005, "home": "/home/ssn", "module": "user", "name": "ssn", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50002}
  14. ok: [deerhunter] => {"append": "no", "changed": true, "comment": "ssn", "group": 50005, "home": "/home/ssn", "module": "user", "name": "ssn", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50002}
  15. ok: [kramervskramer] => {"append": "no", "changed": true, "comment": "ssn", "group": 50005, "home": "/home/ssn", "module": "user", "name": "ssn", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50002}
  16. ok: [ordinarypeople] => {"append": "no", "changed": true, "comment": "ssn", "group": 50005, "home": "/home/ssn", "module": "user", "name": "ssn", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50002}
  17.  
  18. TASK: [create_gpadmin] *********************
  19. ok: [chariotsoffire] => {"append": "no", "changed": true, "comment": "greenplum", "group": 50006, "home": "/home/gpadmin", "module": "user", "name": "gpadmin", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50003}
  20. ok: [deerhunter] => {"append": "no", "changed": true, "comment": "greenplum", "group": 50006, "home": "/home/gpadmin", "module": "user", "name": "gpadmin", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50003}
  21. ok: [ordinarypeople] => {"append": "no", "changed": true, "comment": "greenplum", "group": 50006, "home": "/home/gpadmin", "module": "user", "name": "gpadmin", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50003}
  22. ok: [kramervskramer] => {"append": "no", "changed": true, "comment": "greenplum", "group": 50006, "home": "/home/gpadmin", "module": "user", "name": "gpadmin", "password": "NOT_LOGGING_PASSWORD", "shell": "/bin/bash", "state": "present", "uid": 50003}
  23.  
  24. PLAY RECAP *********************
  25. chariotsoffire : ok=3 changed=2 unreachable=0 failed=0
  26. deerhunter : ok=3 changed=2 unreachable=0 failed=0
  27. kramervskramer : ok=3 changed=2 unreachable=0 failed=0
  28. ordinarypeople : ok=3 changed=2 unreachable=0 failed=0
  29.  
  30.  
  31.  
  32.  
  33. ---
  34.  
  35. - hosts: all
  36. # - hosts: test-delete
  37. user: root
  38. vars:
  39. # created with:
  40. # crypt.crypt('This is my Password', '$1$SomeSalt')
  41. # password: $1$SomeSalt$UqddPX3r4kH3UL5jq5/ZI.
  42. gp_pass: $1$xx/JOxVC$xxx
  43. ssn_pass: $1$x$gxM0YnDxxx
  44.  
  45. # add the gpadmin and ssn users # this is a demo of how the user commands work and how to reference salted passwords
  46. # in vars sections. You could also use vars_files if you like (see other examples)
  47. tasks:
  48. # account creation - name: create_ssn
  49. action: user name=ssn comment=ssn password=$ssn_pass
  50. # - action: user name=ssn state=absent force=yes remove=yes
  51. # - action: group name=ssn state=absent
  52.  
  53. - name: create_gpadmin
  54. action: user name=gpadmin comment=greenplum password=$gp_pass
  55. # - action: user name=gpadmin state=absent force=yes remove=yes
  56. # - action: group name=gpadmin state=absent
Add Comment
Please, Sign In to add comment