Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TASK [cloudstack_provision : Add user via /etc/passwd with membership to sudo group.] ***************************************************************************************
- task path: /home/drose/ansible/roles/cloudstack_provision/tasks/main.yml:75
- Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/user.py
- Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/user.py
- <75.124.77.68> ESTABLISH SSH CONNECTION FOR USER: root
- <75.124.77.68> ESTABLISH SSH CONNECTION FOR USER: root
- <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'"'"''
- <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'"'"''
- Here is the task section of the ./role used:
- - name: Add user via /etc/passwd with membership to sudo group.
- user:
- name : setup
- shell : /bin/bash
- groups : sudo
- append : yes
- state : present
- createhome : yes
- become: true
- # register: setupUser
- Here is my info from the inventory file:
- [linux_aacloud]
- linsrv01 ansible_host=75.124.77.68 ansible_ssh_port=2022 ansible_user=root private_ip=10.1.0.20
- linsrv02 ansible_host=75.124.77.68 ansible_ssh_port=2122 ansible_user=root private_ip=10.1.0.21
- [linux:children]
- linux_localvm
- linux_aacloud
- [linux:vars]
- #################
- ##
- ## In the :vars section of an inventory file, proper format is variable=value
- ## Required variables for controlling a Linux Server via Ansible are:
- ## ansible_user= <username>
- ## ansible_password= <password>
- ##
- #ansible_user=root
- ansible_ssh_private_key_file= "/home/drose/.ssh/id_rsa"
- ## ansible_password=<removed>
- ## ansible_ssh_port=22
- ansible_ssh_common_args='-o StrictHostKeyChecking=no'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement