Update Ansible docs (#3353)

- Add the additional resources section
- change instances of ```yml to ```yaml for consistency
- Remove extra trailing whitespace
This commit is contained in:
Will Fife 2018-10-30 13:04:56 -07:00 committed by Divay Prakash
parent dc52cc8ee9
commit 70a2200201

View File

@ -6,7 +6,7 @@ contributors:
filename: LearnAnsible.txt
---
```yml
```yaml
---
"{{ Ansible }}" is an orchestration tool written in Python.
@ -14,7 +14,7 @@ filename: LearnAnsible.txt
## Example
An example playbook to install apache and configure log level
```yml
```yaml
---
- hosts: apache
@ -163,7 +163,7 @@ This example-playbook would execute (on all hosts defined in the inventory) two
* `ping` that would return message *pong*
* `shell` that execute three commands and return the output to our terminal
```yml
```yaml
- hosts: all
tasks:
@ -213,7 +213,7 @@ It is a great way to introduce `object oriented` management for your application
Role can be included in your playbook (executed via your playbook).
```yml
```yaml
- hosts: all
tasks:
@ -427,7 +427,7 @@ You can use the jinja in the CLI too
ansible -m shell -a 'echo {{ my_variable }}` -e 'my_variable=something, playbook_parameter=twentytwo" localhost
```
In fact - jinja is used to template parts of the playbooks too
```yml
```yaml
#check part of this playbook: playbooks/roles/sys_debug/tasks/debug_time.yml
- local_action: shell date +'%F %T'
register: ts
@ -638,7 +638,7 @@ But ansible is way more! It provides an execution plans, an API, library, callba
It is an agent-less tool - every agent consumes up to 16MB ram - in some environments, it may be noticable amount.
It is agent-less - you have to verify your environment consistency 'on-demand' - there is no built-in mechanism that would warn you about some change automatically (this can be achieved with reasonable effort)
Official GUI Tool (web inferface) - Ansible Tower - is great, but it is expensive. There is no 'small enterprice' payment plan. Easy workaround with Rundeck or Jenkins is possible with reasonable workload.
Official GUI Tool (web inferface) - Ansible Tower - is great, but it is expensive. There is no 'small enterprice' payment plan, however Ansible AWX is the free open source version we were all waiting for.
#### Pros
@ -650,6 +650,7 @@ It executes 'as is' - other tools (salt, puppet, chef - might execute in differe
Documentation is at the world-class standard!
The comunity (github, stackOverflow) would help you very fast.
Writing own modules and extension is fairly easy.
Ansible AWX is the open source version of Ansible Tower we have been waiting for, which provides an excellent UI.
#### Neutral
Migration Ansible<->Salt is failrly easy - so if you would need an event-driven agent environment - it would be a good choice to start quick with Ansible, and convert to salt when needed.
@ -660,4 +661,9 @@ Ansible uses ssh or paramiko as a transport layer. In a way you can imagine that
The simplest way is to execute remote command in more controlled way (still using ssh).
On the other hand - in advanced scope - you can wrap Ansible (use python Ansible code as a library) with your own Python scrips! This is awesome! It would act a bit like Fabric then.
## Additional Resources
* [Servers For Hackers: An Ansible Tutorial](https://serversforhackers.com/c/an-ansible-tutorial)
* [A system administrator's guide to getting started with Ansible - FAST!](https://www.redhat.com/en/blog/system-administrators-guide-getting-started-ansible-fast)
* [Ansible Tower](https://www.ansible.com/products/tower) - Ansible Tower provides a web UI, dashboard and rest interface to ansible.
* [Ansible AWX](https://github.com/ansible/awx) - The Open Sourc version of Ansible Tower.