From a72d045723835c92ff2ea23c60d392da3876940e Mon Sep 17 00:00:00 2001 From: Thomas MALGOUYRES Date: Tue, 7 Jul 2026 07:50:19 +0000 Subject: [PATCH] ajout base ansible --- inventory/hosts.ini | 2 ++ playbooks/ping-local.yml | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 inventory/hosts.ini create mode 100644 playbooks/ping-local.yml diff --git a/inventory/hosts.ini b/inventory/hosts.ini new file mode 100644 index 0000000..f7d2ca3 --- /dev/null +++ b/inventory/hosts.ini @@ -0,0 +1,2 @@ +[ansible_runner] +localhost ansible_connection=local ansible_python_interpreter=/usr/bin/python3 diff --git a/playbooks/ping-local.yml b/playbooks/ping-local.yml new file mode 100644 index 0000000..5f85d63 --- /dev/null +++ b/playbooks/ping-local.yml @@ -0,0 +1,8 @@ +- name: Test Ansible local + hosts: ansible_runner + gather_facts: true + + tasks: + - name: Afficher un message de test + debug: + msg: "Ansible fonctionne correctement sur {{ inventory_hostname }}"