ansible.rst 1.03 KB
Newer Older
Hannes Liivat's avatar
Hannes Liivat committed
1
2
3
========================
Our Ansible cheat sheet
========================
4

Luc Saffre's avatar
Luc Saffre committed
5
6
7
Note: we don't yet use Ansible efficiently, we are on our way to discover it and
we are not in a hurry.

Luc Saffre's avatar
Luc Saffre committed
8
9
Strange::

Luc Saffre's avatar
Luc Saffre committed
10
  [WARNING]: Platform linux on host xyz.mylino.net is using the discovered Python interpreter at /usr/bin/python, but future
Luc Saffre's avatar
Luc Saffre committed
11
12
13
14
15
16
17
18
19
  installation of another Python interpreter could change this. See
  https://docs.ansible.com/ansible/2.9/reference_appendices/interpreter_discovery.html for more information.

Create a file :xfile:`~/.ansible.cfg`::

  [default]
  interpreter_python=auto_legacy_silent

But the warning doesn't go away...
20
21
22
23
24
25
26

How to build a Docker image that allows you to ssh into it::

  $ go hg
  $ cd projects/ansible
  $ docker build -t newserver -f Newserver ~/.ssh
  $ docker run -it newserver /bin/bash
Luc Saffre's avatar
Luc Saffre committed
27
28
29
30
31

External resources:

- `Ansible Tutorial for Beginners: Playbook & Examples <https://spacelift.io/blog/ansible-tutorial>`__
- `Terraform vs. Ansible : Key Differences and Comparison of Tools <https://spacelift.io/blog/ansible-vs-terraform>`__