From 35823c28131909c4822c95b557877d8dc899b1d3 Mon Sep 17 00:00:00 2001 From: Ariejan de Vroom Date: Thu, 6 Jun 2024 18:21:37 +0200 Subject: [PATCH] Setup role 01 host_info --- ansible.cfg | 6 ++++++ hosts | 2 ++ main.yml | 0 roles/01_host_info/tasks/main.yml | 6 ++++++ 4 files changed, 14 insertions(+) create mode 100644 ansible.cfg create mode 100644 hosts create mode 100644 main.yml create mode 100644 roles/01_host_info/tasks/main.yml diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..ddff934 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,6 @@ +[defaults] +inventory = hosts +force_color=true + +[diff] +always = yes \ No newline at end of file diff --git a/hosts b/hosts new file mode 100644 index 0000000..80f7e7f --- /dev/null +++ b/hosts @@ -0,0 +1,2 @@ +[all] +127.0.0.1 ansible_connection=local \ No newline at end of file diff --git a/main.yml b/main.yml new file mode 100644 index 0000000..e69de29 diff --git a/roles/01_host_info/tasks/main.yml b/roles/01_host_info/tasks/main.yml new file mode 100644 index 0000000..65ae324 --- /dev/null +++ b/roles/01_host_info/tasks/main.yml @@ -0,0 +1,6 @@ +--- +- name: Check distribution is supported + ansible.builtin.assert: + that: ansible_distribution == "Archlinux" + fail_msg: "Distribution '{{ ansible_distribution }}' is not supported." + success_msg: "I run Arch, btw" \ No newline at end of file