Installing Ansible from source?

768 views
Skip to first unread message

O haya

unread,
Aug 2, 2015, 12:34:53 PM8/2/15
to Ansible Project
Hi,

I'm trying to install Ansible from source, following this page:


However, I get to this step:


 
 
 

 

[root@centos65 ansible]#
  source
./hacking/env-setup


 

Ansible now needs
  setuptools
in order to build. Install it using your package manager (usually
  python
-setuptools) or via pip (pip install setuptools).


 

 


 

Setting up Ansible to run
 
out of checkout...


 

 


 

PATH=/root/ansible/bin:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin


 

PYTHONPATH=/root/ansible/lib:


 

MANPATH=/root/ansible/docs/man:


 

 


 

Remember, you may wish to
  specify your host file
with -i


 

 


 

Done!


 

 


 


and I'm not quite sure what to do after that.

I've tried various different things, like just do yum install python-setuptools, etc. but I think I'm always not ending up with a good Ansible installation.

I'm currently like that, but when I try run win_ping I am getting:

[root@centos65 ansible]# ansible windows -i host -m win_ping
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: NameError: name 'AnsibleError' is not defined
    "failed": true,
    "stdout": ""
}
[root@centos65 ansible]#




and:

[root@centos65 ansible]# ansible windows -i host -m win_ping -vvvv
No config file found; using defaults
Loaded callback minimal of type stdout, v2.0
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/root/ansible/lib/ansible/executor/process/worker.py", line 118, in run
    executor_result = TaskExecutor(host, task, job_vars, new_play_context, self._new_stdin, self._loader, shared_loader_obj).run()
  File "/root/ansible/lib/ansible/executor/task_executor.py", line 117, in run
    res = self._execute()
  File "/root/ansible/lib/ansible/executor/task_executor.py", line 265, in _execute
    self._connection = self._get_connection(variables)
  File "/root/ansible/lib/ansible/executor/task_executor.py", line 440, in _get_connection
    connection = connection_loader.get(conn_type, self._play_context, self._new_stdin)
  File "/root/ansible/lib/ansible/plugins/__init__.py", line 282, in get
    self._module_cache[path] = imp.load_source('.'.join([self.package, name]), path)
  File "/root/ansible/lib/ansible/plugins/connections/winrm.py", line 34, in <module>
    raise AnsibleError("winrm is not installed")
NameError: name 'AnsibleError' is not defined

    "failed": true,
    "stdout": ""
}
[root@centos65 ansible]#



So can anyone tell me the correct way to install this from source?

Thanks,
Jim

O haya

unread,
Aug 2, 2015, 12:36:58 PM8/2/15
to Ansible Project

O haya

unread,
Aug 2, 2015, 12:37:20 PM8/2/15
to Ansible Project

O haya

unread,
Aug 2, 2015, 1:24:34 PM8/2/15
to Ansible Project
I'm not sure exactly how I did it, but I seemed to have gotten a good installation.  At one point, it was weird and seemed to have blown away all of the paths to "ansible" (i.e., so I couldn't run "ansible").  I did make and make install in the Ansible dir and then that seemed to have fixed things up??

Jim
Reply all
Reply to author
Forward
0 new messages