Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- : [robtest1] ;
- : [1639] root@chariotsoffire:~ # ; ansible-playbook --verbose /etc/ansible/playbooks/add_user/setup.yml
- PLAY [all] *********************
- GATHERING FACTS *********************
- ok: [deerhunter]
- ok: [chariotsoffire]
- ok: [kramervskramer]
- ok: [ordinarypeople]
- TASK: [create_ssn] *********************
- 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}
- 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}
- 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}
- 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}
- TASK: [create_gpadmin] *********************
- 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}
- 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}
- 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}
- 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}
- PLAY RECAP *********************
- chariotsoffire : ok=3 changed=2 unreachable=0 failed=0
- deerhunter : ok=3 changed=2 unreachable=0 failed=0
- kramervskramer : ok=3 changed=2 unreachable=0 failed=0
- ordinarypeople : ok=3 changed=2 unreachable=0 failed=0
- ---
- - hosts: all
- # - hosts: test-delete
- user: root
- vars:
- # created with:
- # crypt.crypt('This is my Password', '$1$SomeSalt')
- # password: $1$SomeSalt$UqddPX3r4kH3UL5jq5/ZI.
- gp_pass: $1$xx/JOxVC$xxx
- ssn_pass: $1$x$gxM0YnDxxx
- # add the gpadmin and ssn users # this is a demo of how the user commands work and how to reference salted passwords
- # in vars sections. You could also use vars_files if you like (see other examples)
- tasks:
- # account creation - name: create_ssn
- action: user name=ssn comment=ssn password=$ssn_pass
- # - action: user name=ssn state=absent force=yes remove=yes
- # - action: group name=ssn state=absent
- - name: create_gpadmin
- action: user name=gpadmin comment=greenplum password=$gp_pass
- # - action: user name=gpadmin state=absent force=yes remove=yes
- # - action: group name=gpadmin state=absent
Add Comment
Please, Sign In to add comment