From 06b094e769d3202f6cf8c9c64679be642d7d32d3 Mon Sep 17 00:00:00 2001 From: citty Date: Fri, 15 Oct 2021 22:20:55 -0400 Subject: [PATCH] why won't this handler thing work --- roles/immortal/handlers/main.yml | 3 +++ roles/web/tasks/main.yml | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 roles/immortal/handlers/main.yml create mode 100644 roles/web/tasks/main.yml diff --git a/roles/immortal/handlers/main.yml b/roles/immortal/handlers/main.yml new file mode 100644 index 0000000..4965c9d --- /dev/null +++ b/roles/immortal/handlers/main.yml @@ -0,0 +1,3 @@ +- name: restart ufw + service: name=ufw state=restarted + become: yes \ No newline at end of file diff --git a/roles/web/tasks/main.yml b/roles/web/tasks/main.yml new file mode 100644 index 0000000..00e1ea0 --- /dev/null +++ b/roles/web/tasks/main.yml @@ -0,0 +1,8 @@ +--- +- name: Allow Web traffic + ufw: rule={{ item.rule }} port={{ item.port }} proto={{ item.proto }} + with_items: + - { rule: 'allow', port: '80', proto: 'tcp' } + notify: + - restart ufw + become: yes \ No newline at end of file