Advertisement
Guest User

Untitled

a guest
Jun 8th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. TASK [cloudstack_provision : Add user via /etc/passwd with membership to sudo group.] ***************************************************************************************
  2. task path: /home/drose/ansible/roles/cloudstack_provision/tasks/main.yml:75
  3. Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/user.py
  4. Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/user.py
  5. <75.124.77.68> ESTABLISH SSH CONNECTION FOR USER: root
  6. <75.124.77.68> ESTABLISH SSH CONNECTION FOR USER: root
  7. <75.124.77.68> SSH: EXEC sshpass -d15 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=2022 -o 'IdentityFile="/home/drose/.ssh/id_rsa"' -o User=root -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/drose/.ansible/cp/%h-%r 75.124.77.68 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
  8. <75.124.77.68> SSH: EXEC sshpass -d15 ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o Port=2122 -o 'IdentityFile="/home/drose/.ssh/id_rsa"' -o User=root -o ConnectTimeout=10 -o StrictHostKeyChecking=no -o ControlPath=/home/drose/.ansible/cp/%h-%r 75.124.77.68 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
  9.  
  10.  
  11. Here is the task section of the ./role used:
  12. - name: Add user via /etc/passwd with membership to sudo group.
  13. user:
  14. name : setup
  15. shell : /bin/bash
  16. groups : sudo
  17. append : yes
  18. state : present
  19. createhome : yes
  20. become: true
  21. # register: setupUser
  22.  
  23.  
  24. Here is my info from the inventory file:
  25. [linux_aacloud]
  26. linsrv01 ansible_host=75.124.77.68 ansible_ssh_port=2022 ansible_user=root private_ip=10.1.0.20
  27. linsrv02 ansible_host=75.124.77.68 ansible_ssh_port=2122 ansible_user=root private_ip=10.1.0.21
  28.  
  29. [linux:children]
  30. linux_localvm
  31. linux_aacloud
  32.  
  33. [linux:vars]
  34. #################
  35. ##
  36. ## In the :vars section of an inventory file, proper format is variable=value
  37. ## Required variables for controlling a Linux Server via Ansible are:
  38. ## ansible_user= <username>
  39. ## ansible_password= <password>
  40. ##
  41. #ansible_user=root
  42. ansible_ssh_private_key_file= "/home/drose/.ssh/id_rsa"
  43. ## ansible_password=<removed>
  44. ## ansible_ssh_port=22
  45. ansible_ssh_common_args='-o StrictHostKeyChecking=no'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement