Commit 47d3ad8c authored by Vincent Mazenod's avatar Vincent Mazenod
Browse files

attaque ansible

parent fb20a72b
......@@ -3,6 +3,59 @@
![ansible](images/ansible.png "ansible")<!-- .element width="30%" -->
## ansible
* outil de
* provisioning
* gestion de config
* déploiemenet d'application
* racheté par RedHat en octobre 2015
* outils équivalents
* puppet, chief, salt ...
## ansible
* écrit en python
* python 2 par défaut
* marche bien en python 3
* virtualenv
## ansible
* prérequis
* sur la machine pilote (mgmt node)
* ansible
* sur le(s) noeud(s)
* une connextion ssh ou PowerShell
* python
## ansible
[![gestion ansible](images/ansible_mgmt.png "gestion ansible")](
## terminologie
* **mgmt node** - Ansible management node is the machine where the Ansible is installed & which is responsible for configuration of all server machines.
Inventory:- Inventory is a file which consists of IP Address of all servers on which configuration is to be done.
Playbook: Playbook is used to manage configuration which can be deployed on the remote machines. Playbook is designed in simple human-readable format, so that it becomes easy to understand the code.
Task:- Task is the file where a user defines the steps that he needs to perform on the Playbook.
Module:- Ansible has in-built modules that can be executed directly on remote hosts or through Playbooks. Users can also write their own modules. These modules can control system resources, like services, packages, or files or handle execution of system commands.
Role: Role is used for organizing Playbooks and other files in order to facilitate sharing and reusing portions of a provisioning.
Play: A provisioning executed from start to finish is called a Play.
Facts:Used to get the system information while running the playbook, like network interfaces or operating system.
Handlers: Handlers which are similar to a task, can be used to restart or to stop a service.
ansible all --inventory-file=inventory.ini --module-name ping -u root
* modules
* task
* register
* debug
......@@ -16,11 +69,13 @@
* --check --diff
* verbosité
* tags
* variable (see debug task)
* hierarchie
* from env ou Vault
* acces dynamique
* ansible-vault : utiliser vault
* plugin
* callback
* filter
......@@ -29,6 +84,7 @@
* pexpect
* remote roles
* skeleton
### Récupérer les roles nécessaires
......@@ -97,6 +97,7 @@ $ vagrant box remove "ubuntu/xenial64"
$ vagrant init "ubuntu/bionic64"
$ vagrant up #--provider=virtualbox
$ vagrant provision
$ vagrant ssh
$ vagrant halt
$ vagrant suspend
......@@ -170,6 +171,8 @@ Vagrant.configure("2") do |config|
### idéal pour tester les playbooks
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment