Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issue #107 to restore network report demo #175

Merged
merged 9 commits into from
Sep 18, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,20 @@
check_mode: false

- name: Copy logos over
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ file_path }}"
directory_mode: true
mode: "0644"
loop:
- "webpage_logo.png"
- "redhat-ansible-logo.svg"
- "router.png"
loop_control:
loop_var: logo
ansible.builtin.copy:
src: "{{ logo }}"
dest: "{{ file_path }}"
directory_mode: true
mode: "0644"

jce-redhat marked this conversation as resolved.
Show resolved Hide resolved
check_mode: false

# - name: Display link to Linux patch report
# ansible.builtin.debug:
# msg: "Please go to http://{{ hostvars[report_server]['ansible_host'] }}/reports/network.html"
jce-redhat marked this conversation as resolved.
Show resolved Hide resolved
- name: Display link to Linux patch report
ansible.builtin.debug:
msg: "Please go to http://{{ hostvars[report_server]['ansible_host'] }}/reports/network.html"
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
- name: Include system variables
ansible.builtin.include_vars: "{{ ansible_system }}.yml"

- name: Permit traffic in default zone for http service
ansible.posix.firewalld:
service: http
permanent: true
state: enabled
immediate: true
check_mode: false
# - name: Permit traffic in default zone for http service
# ansible.posix.firewalld:
# service: http
# permanent: true
# state: enabled
# immediate: true
# check_mode: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, delete vs. comment out


- name: Install httpd package
ansible.builtin.yum:
Expand All @@ -30,8 +30,10 @@
mode: "0644"
check_mode: false

- name: Install httpd service
- name: Start httpd service
ansible.builtin.service:
name: httpd
state: started
check_mode: false

...
10 changes: 5 additions & 5 deletions network/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
gather_network_resources: all
when: ansible_network_os == 'cisco.nxos.nxos'

- name: Gather all network resource and minimal legacy facts [Cisco IOS XR]
cisco.iosxr.iosxr_facts:
gather_subset: min
gather_network_resources: all
when: ansible_network_os == 'cisco.iosxr.iosxr'
# - name: Gather all network resource and minimal legacy facts [Cisco IOS XR]
# cisco.iosxr.iosxr_facts:
# gather_subset: min
# gather_network_resources: all
# when: ansible_network_os == 'cisco.iosxr.iosxr'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above, delete vs. comment out


# # The dig lookup requires the python 'dnspython' library
# - name: Resolve IP address
Expand Down
17 changes: 5 additions & 12 deletions network/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,21 @@ controller_projects:
default_environment: Networking Execution Environment

controller_inventories:
- name: Network Inventory
- name: Demo Inventory
organization: Default

controller_inventory_sources:
- name: DevNet always-on sandboxes
source: scm
inventory: Network Inventory
inventory: Demo Inventory
overwrite: true
source_project: Network Golden Configs
source_path: hosts

controller_hosts:
- name: node1
inventory: Network Inventory
variables:
ansible_user: rhel
ansible_host: node1

controller_templates:
- name: NETWORK / Configuration
organization: Default
inventory: Network Inventory
inventory: Demo Inventory
survey_enabled: true
project: Network Golden Configs
playbook: main.yml
Expand Down Expand Up @@ -70,7 +63,7 @@ controller_templates:
- name: "NETWORK / Report"
job_type: check
organization: Default
inventory: Network Inventory
inventory: Demo Inventory
project: "Ansible official demo project"
playbook: "network/report.yml"
notification_templates_started: Telemetry
Expand Down Expand Up @@ -99,7 +92,7 @@ controller_templates:
- name: "NETWORK / DISA STIG"
job_type: check
organization: Default
inventory: Network Inventory
inventory: Demo Inventory
project: "Ansible official demo project"
playbook: "network/compliance.yml"
notification_templates_started: Telemetry
Expand Down
Loading