diff options
author | heqnx <root@heqnx.com> | 2025-07-05 12:21:29 +0300 |
---|---|---|
committer | heqnx <root@heqnx.com> | 2025-07-05 12:21:29 +0300 |
commit | 9457306a881cfe476ee0abbdba4f6f1eaa80db9d (patch) | |
tree | a0051e68286eb93381a398d2681ec5a14f5c035e /tasks/preflight.yaml | |
parent | 730705affa4407a9dee7c52e5deb825020da110d (diff) | |
download | ansible-icecast2-9457306a881cfe476ee0abbdba4f6f1eaa80db9d.tar.gz ansible-icecast2-9457306a881cfe476ee0abbdba4f6f1eaa80db9d.zip |
initial commit on a working icecast2 setup
Diffstat (limited to 'tasks/preflight.yaml')
-rw-r--r-- | tasks/preflight.yaml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tasks/preflight.yaml b/tasks/preflight.yaml new file mode 100644 index 0000000..3358d46 --- /dev/null +++ b/tasks/preflight.yaml @@ -0,0 +1,16 @@ +- name: ensure script is run as root + assert: + that: + - ansible_effective_user_id == 0 + fail_msg: "this playbook must be run as root" + +- name: check if system is debian-based + command: dpkg -l + register: dpkg_check + changed_when: false + failed_when: false + +- name: fail if not debian-based + fail: + msg: "distribution not Debian-based" + when: dpkg_check.rc != 0 |