Skip to content

vincedgy/ansible-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Ansible scripts

A simple repository of my Ansible playbook

Reference : http://docs.ansible.com/

Installation

http://docs.ansible.com/ansible/intro_installation.html

You should install ansible by python package manager pip

$ sudo pip install ansible

Special mention on paramiko

http://www.paramiko.org/

You should give a look on this ssh2 implementation tool used by Ansible itself.

$ sudo pip install paramiko

First steps

Install openssh

Depending on your system, the way to install openssh can change. On my MAC it is simple as :

$ brew update
$ brew install openssh

Create /etc/ansible/hosts for ansible inventory

Simply create and file /etc/ansible/hosts (and give you suffisant write rights on it)

$ sudo mkdir /etc/ansible
$ sudo touch /etc/ansible/hosts
$ sudo chmod a+rx /etc/ansible
$ sudo chmod a+rw /etc/ansible/hosts

And add your localhost (mainly for testing purpose for now)

$ sudo echo "
[targets]
localhost              ansible_connection=local
" >> /etc/ansible/hosts

You can now issue a very first ansible command to localhost :

$ ansible localhost -m ping -e 'ansible_python_interpreter="/usr/bin/env python"'
localhost | SUCCESS => {
    "changed": false, 
    "ping": "pong"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published