-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b51439b
commit 0aa6d5d
Showing
8 changed files
with
158 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,5 +16,5 @@ wazuh_protocol: TCP | |
|
||
# Remote IPS | ||
# remote_ip: 172.16.1. | ||
remote_net: | ||
remote_net: | ||
- 172.16.1.0/24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,4 @@ wrccdc_fw: | |
fw_block: | ||
- esx | ||
- dc | ||
- db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
- name: Palo initial config | ||
hosts: palo | ||
connection: local | ||
gather_facts: true | ||
# ignore_errors: true | ||
roles: | ||
- dsu.ccdc.palo | ||
vars: | ||
provider: | ||
ip_address: "{{ inventory_hostname }}" | ||
api_key: "{{ api_key }}" | ||
|
||
tasks: | ||
- name: Include role | ||
ansible.builtin.include_role: | ||
name: dsu.ccdc.palo | ||
vars_from: main.yml | ||
# - name: Show Facts | ||
# ansible.builtin.debug: | ||
# var: "{{update_os}}, {{logging}}" | ||
|
||
- name: Load vars | ||
ansible.builtin.include_vars: | ||
dir: /home/ansible/data/vars/ | ||
|
||
- name: Gather info | ||
paloaltonetworks.panos.panos_facts: | ||
provider: "{{ provider }}" | ||
gather_subset: vsys | ||
register: info | ||
|
||
- name: Print info | ||
ansible.builtin.debug: | ||
var: info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
- name: Palo initial config | ||
hosts: palo | ||
connection: local | ||
# ignore_errors: true | ||
roles: | ||
- dsu.ccdc.palo | ||
vars: | ||
provider: | ||
ip_address: "{{ inventory_hostname }}" | ||
api_key: "{{ api_key }}" | ||
|
||
tasks: | ||
- name: PAN-OS_update | ||
ansible.builtin.debug: | ||
msg: "{{ palo_panos_version }}" | ||
|
||
- name: Download PAN-OS update | ||
paloaltonetworks.panos.panos_software: | ||
provider: "{{ provider }}" | ||
version: "{{ palo_panos_version }}" | ||
install: true | ||
restart: true | ||
register: install_result | ||
|
||
- name: Notify Reboot Handler | ||
ansible.builtin.command: echo "Wait for Device Reboot" | ||
notify: reboot | ||
changed_when: false | ||
|
||
- name: Pause for Restart Checks | ||
ansible.builtin.pause: | ||
seconds: 10 | ||
|
||
- name: Wait for Online Handler | ||
ansible.builtin.meta: flush_handlers | ||
|
||
- name: Set os_update as done | ||
ansible.builtin.set_fact: | ||
palo_update_os: false | ||
cacheable: true | ||
when: palo_update_os | ||
|
||
handlers: | ||
- name: Wait for System Information | ||
paloaltonetworks.panos.panos_op: | ||
provider: "{{ provider }}" | ||
device_group: "{{ device_group if device_group is defined else omit }}" | ||
cmd: show system info | ||
register: system_info | ||
until: system_info is not failed | ||
retries: 100 | ||
delay: 10 | ||
listen: reboot | ||
|
||
- name: Update System Info | ||
ansible.builtin.set_fact: | ||
system_info_json: "{{ system_info.stdout | from_json }}" | ||
listen: reboot | ||
|
||
- name: Update Software Version | ||
ansible.builtin.set_fact: | ||
sw_version: "{{ system_info_json.response.result.system['sw-version'] }}" | ||
listen: reboot | ||
|
||
- name: Display Current Software version | ||
ansible.builtin.debug: | ||
msg: "Current software version is: {{ sw_version }}" | ||
listen: reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
- name: Palo initial config | ||
hosts: palo | ||
connection: local | ||
# ignore_errors: true | ||
roles: | ||
- dsu.ccdc.palo | ||
vars: | ||
provider: | ||
ip_address: "{{ inventory_hostname }}" | ||
api_key: "{{ api_key }}" | ||
|
||
tasks: | ||
- name: Include role | ||
ansible.builtin.include_role: | ||
name: dsu.ccdc.palo | ||
vars_from: main | ||
|
||
- name: Load vars | ||
ansible.builtin.include_vars: | ||
dir: /home/ansible/data/vars/ | ||
|
||
- name: Palo update content | ||
ansible.builtin.import_role: | ||
name: dsu.ccdc.palo | ||
tasks_from: content_update | ||
|
||
- name: Palo update wildfire | ||
ansible.builtin.import_role: | ||
name: dsu.ccdc.palo | ||
tasks_from: wildfire_update | ||
|
||
- name: Palo update AV | ||
ansible.builtin.import_role: | ||
name: dsu.ccdc.palo | ||
tasks_from: av_update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -q -N "" | ||
cat ~/.ssh/id_rsa.pub |