From 5b4bccb0e35518085375110daecbc67e63b1919f Mon Sep 17 00:00:00 2001 From: loictlpk Date: Wed, 26 Jul 2023 10:56:40 +0200 Subject: [PATCH] BetteModuleTest --- ansible/firewallNoPing.yml | 11 +++++++++++ ansible/hostname.yml | 5 +++++ ansible/playbook.yml | 27 +++------------------------ ansible/sudoInstallPkg.yml | 6 ++++++ 4 files changed, 25 insertions(+), 24 deletions(-) create mode 100644 ansible/firewallNoPing.yml create mode 100644 ansible/hostname.yml create mode 100644 ansible/sudoInstallPkg.yml diff --git a/ansible/firewallNoPing.yml b/ansible/firewallNoPing.yml new file mode 100644 index 0000000..8605aa1 --- /dev/null +++ b/ansible/firewallNoPing.yml @@ -0,0 +1,11 @@ +#FIREWALL RULE : No Ping + - name: pfsensible_firewallRule + pfsensible.core.pfsense_rule: + name: 'NoPing' + action: block + interface: lan + ipprotocol: inet + protocol: icmp + source: any + destination: any + after: top \ No newline at end of file diff --git a/ansible/hostname.yml b/ansible/hostname.yml new file mode 100644 index 0000000..47921eb --- /dev/null +++ b/ansible/hostname.yml @@ -0,0 +1,5 @@ +#CHANGE HOSTNAME + - name: pfsensible_hostname + pfsensible.core.pfsense_setup: + hostname: PF_Loic + domain: mirahi.local \ No newline at end of file diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 473a9ae..77aafa2 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -4,27 +4,6 @@ hosts: pfswitch tasks: -#REQUIRED PKG FOR MANAGEMENT - - name: install sudo pkg on pfsense - package: - name: - - sudo - state: latest - -#CHANGE HOSTNAME - - name: pfsensible_hostname - pfsensible.core.pfsense_setup: - hostname: PF_Loic - domain: mirahi.local - -#FIREWALL RULE : No Ping - - name: pfsensible_firewallRule - pfsensible.core.pfsense_rule: - name: 'NoPing' - action: block - interface: lan - ipprotocol: inet - protocol: icmp - source: any - destination: any - after: top \ No newline at end of file + - include: sudoInstallPkg.yml + - include: hostname.yml + - include: firewallNoPing.yml \ No newline at end of file diff --git a/ansible/sudoInstallPkg.yml b/ansible/sudoInstallPkg.yml new file mode 100644 index 0000000..3f06db3 --- /dev/null +++ b/ansible/sudoInstallPkg.yml @@ -0,0 +1,6 @@ +#REQUIRED PKG FOR MANAGEMENT + - name: install sudo pkg on pfsense + package: + name: + - sudo + state: latest \ No newline at end of file