From 0ad05fedf2397bdbb451f9a04a0f0b38fda1da90 Mon Sep 17 00:00:00 2001 From: Louis Vallat Date: Thu, 17 Nov 2022 10:02:05 +0100 Subject: [PATCH] feat: added service status for services and added dnsmasq to the softwares needed for a router Signed-off-by: Louis Vallat --- roles/dnsmasq/tasks/main.yaml | 16 ++++++++++++++++ roles/docker/tasks/main.yaml | 10 ++++++++++ router.yaml | 10 ++++++++++ 3 files changed, 36 insertions(+) create mode 100644 roles/dnsmasq/tasks/main.yaml create mode 100644 router.yaml diff --git a/roles/dnsmasq/tasks/main.yaml b/roles/dnsmasq/tasks/main.yaml new file mode 100644 index 0000000..22e7483 --- /dev/null +++ b/roles/dnsmasq/tasks/main.yaml @@ -0,0 +1,16 @@ +--- +- name: Install dnsmasq + ansible.builtin.apt: + name: dnsmasq + state: latest + update_cache: true + +- name: Enable dnsmasq service + ansible.builtin.service: + name: dnsmasq + state: started + +- name: Start dnsmasq service + ansible.builtin.service: + name: dnsmasq + enabled: true diff --git a/roles/docker/tasks/main.yaml b/roles/docker/tasks/main.yaml index d0fe70a..d6ec866 100644 --- a/roles/docker/tasks/main.yaml +++ b/roles/docker/tasks/main.yaml @@ -28,3 +28,13 @@ - docker-compose-plugin state: latest update_cache: true + +- name: Enable docker service + ansible.builtin.service: + name: docker + enabled: true + +- name: Start docker service + ansible.builtin.service: + name: docker + state: started diff --git a/router.yaml b/router.yaml new file mode 100644 index 0000000..83d4676 --- /dev/null +++ b/router.yaml @@ -0,0 +1,10 @@ +--- +- name: "Update/upgrade debian and install docker and misc tools." + hosts: router + roles: + - system + - softwares + - bpytop + - dnsmasq + - nftables + - clean