From 71f927e732554c88b1fe48b32ce3c54c1ebd4774 Mon Sep 17 00:00:00 2001 From: Thomas Kleinendorst Date: Tue, 19 Nov 2024 13:25:46 +0100 Subject: [PATCH] Enable and run all basic roles --- playbook.yml | 6 +-- roles/basic-intalls/handlers/main.yml | 6 --- roles/basic-intalls/tasks/main.yml | 60 --------------------------- roles/packages/tasks/main.yml | 16 +++++++ 4 files changed, 19 insertions(+), 69 deletions(-) delete mode 100644 roles/basic-intalls/handlers/main.yml delete mode 100644 roles/basic-intalls/tasks/main.yml create mode 100644 roles/packages/tasks/main.yml diff --git a/playbook.yml b/playbook.yml index b211355..02ea67a 100644 --- a/playbook.yml +++ b/playbook.yml @@ -13,9 +13,9 @@ become: true - role: geerlingguy.docker become: true - # - role: hostname - # - role: basic-intalls - # - role: user + - role: hostname + - role: packages + - role: user # - role: cloudflare-ddns # - role: cloudflared # - role: nginx diff --git a/roles/basic-intalls/handlers/main.yml b/roles/basic-intalls/handlers/main.yml deleted file mode 100644 index bce8e2d..0000000 --- a/roles/basic-intalls/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -- name: Restart ufw - become: true - ansible.builtin.systemd: - name: ufw.service - state: restarted diff --git a/roles/basic-intalls/tasks/main.yml b/roles/basic-intalls/tasks/main.yml deleted file mode 100644 index d60770f..0000000 --- a/roles/basic-intalls/tasks/main.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -- name: Install basic packages - become: true - ansible.builtin.apt: - pkg: - - git - - vim - - dnsutils - - rsyslog - # - ufw - - podman - - snapd - state: present -- name: Install Snap Core - become: true - community.general.snap: - name: core - state: present -# - name: Set default policy (incoming) -# become: true -# community.general.ufw: -# direction: incoming -# policy: deny -# notify: Restart ufw -# - name: Set default policy (outgoing) -# become: true -# community.general.ufw: -# direction: outgoing -# policy: allow -# notify: Restart ufw -# - name: Set default policy (routed) -# become: true -# community.general.ufw: -# direction: routed -# policy: allow -# notify: Restart ufw -# - name: Allow forwarding in ufw -# become: true -# ansible.builtin.lineinfile: -# path: /etc/ufw/sysctl.conf -# regexp: '^#net/ipv4/ip_forward=1$' -# line: 'net/ipv4/ip_forward=1' -# notify: Restart ufw -# - name: Allow forwarding in sysctl -# become: true -# ansible.builtin.lineinfile: -# path: /etc/sysctl.conf -# regexp: '^#net\.ipv4\.ip_forward=1$' -# line: net.ipv4.ip_forward=1 -# - name: Allow all access to ssh -# become: true -# community.general.ufw: -# rule: allow -# port: ssh -# proto: tcp -# notify: Restart ufw -# - name: Enable ufw -# become: true -# community.general.ufw: -# state: enabled diff --git a/roles/packages/tasks/main.yml b/roles/packages/tasks/main.yml new file mode 100644 index 0000000..5b58c6a --- /dev/null +++ b/roles/packages/tasks/main.yml @@ -0,0 +1,16 @@ +--- +- name: Install basic packages + become: true + ansible.builtin.apt: + pkg: + - git + - vim + - dnsutils + - rsyslog + - snapd + state: present +- name: Install Snap Core + become: true + community.general.snap: + name: core + state: present