Ansible is an open-source software provisioning, configuration management, and application-deployment tool enabling infrastructure as code. It runs on many Unix-like systems, and can configure both Unix-like systems as well as Microsoft Windows. It includes its own declarative language to describe system configuration. Ansible was written by Michael DeHaan and acquired by Red Hat in 2015. Ansible is agentless, temporarily connecting remotely via SSH or Windows Remote Management (allowing remote PowerShell execution) to do its tasks.
The term "ansible" was coined by Ursula K. Le Guin in her 1966 novel Rocannon's World,[1] and refers to fictional instantaneous communication systems.[2][3]
The Ansible tool was developed by Michael DeHaan, the author of the provisioning server application Cobbler and co-author of the Fedora Unified Network Controller (Func) framework for remote administration.[4]
Ansible, Inc. (originally AnsibleWorks, Inc.) was the company founded in 2013 by Michael DeHaan, Timothy Gerla, and Saïd Ziouani to commercially support and sponsor Ansible.[5][6][7] Red Hat acquired Ansible in October 2015.[8][9]
Ansible is included as part of the Fedora distribution of Linux, owned by Red Hat, and is also available for Red Hat Enterprise Linux, CentOS, openSUSE, SUSE Linux Enterprise, Debian, Ubuntu, Scientific Linux, and Oracle Linux via Extra Packages for Enterprise Linux (EPEL), as well as for other operating systems.[10]
<timeline>
ImageSize = width:900 height:340 PlotArea = right:30 left:30 bottom:60 top:30 DateFormat = dd/mm/yyyy Period = from:01/01/2017 till:01/01/2023 TimeAxis = orientation:horizontal Legend = orientation:vertical position:bottom columns:2 Colors =
id:production value:green Legend:Production id:extended value:rgb(0.9,0.9,0.2) Legend:Extended_support id:lightline value:rgb(0.8,0.8,0.8)
BackgroundColors = canvas:white ScaleMajor = gridcolor:lightline unit:year increment:1 start:01/01/2017
Define $vshift = 15 # move text above the bars
PlotData=
bar: color:production mark:(line,white) align:left fontsize:M from:30/11/2021 till:01/01/2023 shift:(-55,-4) text:"Ansible 5.0.0" barset:break color:production from:21/12/2021 till:01/01/2023 shift:(-13,$vshift) text:"5.1.0"
bar: color:production mark:(line,white) align:left fontsize:M from:18/05/2021 till:30/11/2021 shift:(-55,-4) text:"Ansible 4.0.0" barset:break color:production from:08/06/2021 till:30/11/2021 shift:(-13,$vshift) text:"4.1.0"
bar: color:production mark:(line,white) align:left fontsize:M from:16/02/2021 till:18/05/2021 shift:(-55,-4) text:"Ansible 3.0.0" barset:break color:production from:09/03/2021 till:18/05/2021 shift:(-13,$vshift) text:"3.1.0"
bar: color:production mark:(line,white) align:left fontsize:M from:22/09/2020 till:01/05/2022 shift:(-55,-4) text:"Ansible 2.10.0"
bar: color:production mark:(line,white) align:left fontsize:M from:31/10/2019 till:02/10/2021 shift:(-55,-4) text:"Ansible 2.9.0"
bar: color:production mark:(line,white) align:left fontsize:M from:16/05/2019 till:15/09/2019 shift:(-55,-4) text:"Ansible 2.8.0" barset:break color:production from:07/06/2019 till:04/07/2019 shift:(-13,$vshift) text:".1"
bar: color:production mark:(line,white) align:left fontsize:M from:04/10/2018 till:31/12/2018 shift:(-55,-4) text:"Ansible 2.7.0" barset:break color:production from:04/10/2018 till:16/05/2019 shift:(-13,$vshift) text:".0" barset:break color:production from:04/10/2018 till:16/05/2019 shift:(-13,$vshift) text:".1"
bar: color:production mark:(line,white) align:left fontsize:M from:02/07/2018 till:04/10/2018 shift:(-55,-4) text:"Ansible 2.6.0"
bar: color:production mark:(line,white) align:left fontsize:M from:23/03/2018 till:02/07/2018 shift:(-55,-4) text:"Ansible 2.5.0"
bar: color:production mark:(line,white) align:left fontsize:M from:18/09/2017 till:23/03/2018 shift:(-62,-4) text:"Ansible 2.4.0"
TextData =
pos:(275,355) fontsize:L textcolor:black text:"Ansible timeline"
</timeline>
Ansible helps to manage multiple machines by selecting portions of Ansible's inventory stored in simple ASCII text files. The inventory is configurable, and target machine inventory can be sourced dynamically or from cloud-based sources in different formats (YAML, INI).[11]
Sensitive data can be stored in encrypted files using Ansible Vault[12] since 2014.[13] In contrast with other popular configuration-management software — such as Chef, Puppet, Salt and CFEngine — Ansible uses an agentless architecture,[14] with Ansible software not normally running or even installed on the controlled node.[14] Instead, Ansible orchestrates a node by installing and running modules on the node temporarily via SSH. For the duration of an orchestration task, a process running the module communicates with the controlling machine with a JSON-based protocol via its standard input and output.[15] When Ansible is not managing a node, it does not consume resources on the node because no daemons are run or software installed.[14]
Ansible requires Python to be installed on all managing machines, including pip package manager along with configuration-management software and its dependent packages. Managed network devices require no extra dependencies and are agentless.[16]
The control node (master host) is intended to manage (orchestrate) target machines (nodes termed as "inventory", see below).[17] Control nodes are only available for Linux and alike; Windows OSs are not supported. Multiple control nodes are allowed.[17] Ansible does not require a single controlling machine for orchestration[18] ensuring that disaster recovery is simple. [18] Nodes are managed by the controlling node over SSH.
The design goals of Ansible include:[15]
Modules[20] are mostly standalone and can be written in a standard scripting language (such as Python, Perl, Ruby, Bash, etc.). One of the guiding properties of modules is idempotency, which means that even if an operation is repeated multiple times (e.g., upon recovery from an outage), it will always place the system into the same state.[15]
Location of target nodes is specified through inventory configuration lists (INI or YAML formatted) located at /etc/ansible/hosts
(on Linux).[11][21] The configuration file lists either the IP address or hostname of each node that is accessible by Ansible. In addition, nodes can be assigned to groups.[11]
An example inventory (INI format):
192.168.6.1 [webservers] foo.example.com bar.example.com
This configuration file specifies three nodes: the first node is specified by an IP address and the latter two nodes are specified by hostnames. Additionally, the latter two nodes are grouped under the webservers
group.
Ansible can also use a custom Dynamic Inventory script, which can dynamically pull data from a different system,[22] and supports groups of groups.[23]
Playbooks are YAML files that store lists of tasks for repeated[17][24] executions on managed nodes.[17][25] Each Playbook maps (associates) a group of hosts to a set of roles. Each role is represented by calls to Ansible tasks.[26]
Ansible Tower is a REST API, web service, and web-based interface (application) designed to make Ansible more accessible to people with a wide range of IT skillsets. It is a hub for automation tasks. Tower is a commercial product supported by Red Hat, Inc. but derived from AWX upstream project, which is open source since September 2017.[27][28][29][30]
There was also another open source alternative to Tower, Semaphore, written in Go.[31][32]
Control machines have to be a Linux/Unix host (for example BSD, CentOS, Debian, macOS, Red Hat Enterprise Linux, SUSE Linux Enterprise, Ubuntu[10]), and Python 2.7 or 3.5 is required.[16]
Managed nodes, if they are Unix-like, must have Python 2.4 or later. For managed nodes with Python 2.5 or earlier, the python-simplejson
package is also required.[33] Since version 1.7, Ansible can also manage Windows[34] nodes.[33] In this case, native PowerShell remoting supported by the WS-Management protocol is used instead of SSH.
Ansible can deploy to bare metal hosts, virtual machines, and cloud environments.[15]
AnsibleFest is an annual conference of the Ansible community of users, contributors, etc.[35]
Year | Location |
---|---|
2014 | San Francisco |
2015 | London |
2016 | London |
2016 | San Francisco |
2016 | Brooklyn |
2017 | London |
2017 | San Francisco |
2018 | Austin |
2019 | Atlanta |
2020 | Virtual only due to COVID-19 pandemic |
2021 | Virtual only due to COVID-19 pandemic |
2022 | Chicago |
The content is sourced from: https://handwiki.org/wiki/Software:Ansible