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 }}"