From XennisWiki
Jump to: navigation, search

Ansible is a free software platform for configuring and managing computers. It combines multi-node software deployment, ad hoc task execution, and configuration management. It manages nodes over SSH or PowerShell and requires Python to be installed on them. Modules work over JSON and standard output and can be written in any programming language. The system uses YAML to express reusable descriptions of systems. (Wikipedia, (software) Ansible)


Further information: Ansible Documentation - Installation

Using pip
pip install ansible
Debian/Ubuntu (without pip)
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible


Install Linux packages (apt)

Further information: apt module

name: Install java(7-jdk)
apt: pkg={{item}} state=installed
  - openjdk-7-jdk
  - openjdk-7-jre-lib

Install Perl packages (cpanm)

Further information: cpanm module

name: Install perl dependencies
cpanm: name={{item}}
  - Class::Struct
  - File::Basename

Execute commands (command)

Further information: command module

name: Maven install
command: mvn clean install

Download files (get_url)

Further information: get_url module

name: Download example.pdf
get_url: url=

Clone repositories (git)

Further information: git module

name: Clone example repository
git: repo=

Install Python packages (pip)

Further information: pip module

name: Install Python dependencies
pip: name={{item}}
  - subprocess32
  - requests

Usage with Vagrant

see Vagrant

See also

External links