diff --git a/collections/ansible_collections/demo/patching/roles/report_server/files/css/new.css b/collections/ansible_collections/demo/patching/roles/report_server/files/css/new.css new file mode 100644 index 0000000..3266a46 --- /dev/null +++ b/collections/ansible_collections/demo/patching/roles/report_server/files/css/new.css @@ -0,0 +1,202 @@ +p.hostname { + color: #000000; + font-weight: bolder; + font-size: large; + margin: auto; + width: 50%; + } + + #subtable { + background: #ebebeb; + margin: 0px; + width: 100%; + } + + #subtable tbody tr td { + padding: 5px 5px 5px 5px; + } + + #subtable thead th { + padding: 5px; + } + + * { + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; + font-family: "Open Sans", "Helvetica"; + + } + + a { + color: #000000; + } + + p { + color: #ffffff; + } + h1 { + text-align: center; + color: #ffffff; + } + + body { + background:#353a40; + padding: 0px; + margin: 0px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + } + + table { + border-collapse: separate; + background:#fff; + @include border-radius(5px); + @include box-shadow(0px 0px 5px rgba(0,0,0,0.3)); + } + + .main_net_table { + margin:50px auto; + } + + thead { + @include border-radius(5px); + } + + thead th { + font-size:16px; + font-weight:400; + color:#fff; + @include text-shadow(1px 1px 0px rgba(0,0,0,0.5)); + text-align:left; + padding:20px; + border-top:1px solid #858d99; + background: #353a40; + + &:first-child { + @include border-top-left-radius(5px); + } + + &:last-child { + @include border-top-right-radius(5px); + } + } + + tbody tr td { + font-weight:400; + color:#5f6062; + font-size:13px; + padding:20px 20px 20px 20px; + border-bottom:1px solid #e0e0e0; + } + + tbody tr:nth-child(2n) { + background:#f0f3f5; + } + + tbody tr:last-child td { + border-bottom:none; + &:first-child { + @include border-bottom-left-radius(5px); + } + &:last-child { + @include border-bottom-right-radius(5px); + } + } + + td { + vertical-align: top; + } + + span.highlight { + background-color: yellow; + } + + .expandclass { + color: #5f6062; + } + + .content{ + display:none; + margin: 10px; + } + + header { + width: 100%; + position: initial; + float: initial; + padding: 0; + margin: 0; + border-radius: 0; + height: 88px; + background-color: #171717; + } + + .header-container { + margin: 0 auto; + width: 100%; + height: 100%; + max-width: 1170px; + padding: 0; + float: initial; + display: flex; + align-items: center; + } + + .header-logo { + width: 137px; + border: 0; + margin: 0; + margin-left: 15px; + } + + .header-link { + margin-left: 40px; + text-decoration: none; + cursor: pointer; + text-transform: uppercase; + font-size: 15px; + font-family: 'Red Hat Text'; + font-weight: 500; + } + + .header-link:hover { + text-shadow: 0 0 0.02px white; + text-decoration: none; + } + + table.net_info td { + padding: 5px; +} + +p.expandclass:hover { + text-decoration: underline; + color: #EE0000; + cursor: pointer; +} + +.summary_info { +} + +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active, a.ui-button:active, .ui-button:active, .ui-button.ui-state-active:hover { + border: 1px solid #5F0000; + background: #EE0000; +} + +div#net_content { + padding: 0px; + height: auto !important; +} + +img.router_image { + vertical-align: middle; + padding: 0px 10px 10px 10px; + width: 50px; +} + +table.net_info { + width: 100%; +} + +p.internal_label { + color: #000000; +} diff --git a/collections/ansible_collections/demo/patching/roles/report_server/files/redhat-ansible-logo.svg b/collections/ansible_collections/demo/patching/roles/report_server/files/redhat-ansible-logo.svg new file mode 100644 index 0000000..2ecef98 --- /dev/null +++ b/collections/ansible_collections/demo/patching/roles/report_server/files/redhat-ansible-logo.svg @@ -0,0 +1,48 @@ + + + diff --git a/collections/ansible_collections/demo/patching/roles/report_server/files/report.png b/collections/ansible_collections/demo/patching/roles/report_server/files/report.png new file mode 100644 index 0000000..3c38d52 Binary files /dev/null and b/collections/ansible_collections/demo/patching/roles/report_server/files/report.png differ diff --git a/collections/ansible_collections/demo/patching/roles/report_server/files/webpage_logo.png b/collections/ansible_collections/demo/patching/roles/report_server/files/webpage_logo.png new file mode 100644 index 0000000..65b5836 Binary files /dev/null and b/collections/ansible_collections/demo/patching/roles/report_server/files/webpage_logo.png differ diff --git a/collections/ansible_collections/demo/patching/roles/report_server/tasks/apache.yml b/collections/ansible_collections/demo/patching/roles/report_server/tasks/apache.yml index d8faec4..0991231 100644 --- a/collections/ansible_collections/demo/patching/roles/report_server/tasks/apache.yml +++ b/collections/ansible_collections/demo/patching/roles/report_server/tasks/apache.yml @@ -1,20 +1,22 @@ --- +- include_vars: "{{ ansible_system }}.yml" + - yum: name: httpd state: latest check_mode: no - file: - path: /var/www/html/reports/ + path: "{{ doc_root }}/{{ reports_dir }}" state: directory check_mode: no - copy: - dest: /var/www/html/reports/.htaccess + dest: "{{ doc_root }}/{{ reports_dir }}/.htaccess" content: Options +Indexes check_mode: no - service: name: httpd state: started - check_mode: no \ No newline at end of file + check_mode: no diff --git a/collections/ansible_collections/demo/patching/roles/report_server/tasks/iis.yml b/collections/ansible_collections/demo/patching/roles/report_server/tasks/iis.yml index 74e6ffe..e2f61d6 100644 --- a/collections/ansible_collections/demo/patching/roles/report_server/tasks/iis.yml +++ b/collections/ansible_collections/demo/patching/roles/report_server/tasks/iis.yml @@ -1,4 +1,6 @@ --- +- include_vars: "{{ ansible_system }}.yml" + - name: Install IIS ansible.windows.win_feature: name: Web-Server @@ -13,11 +15,11 @@ - name: Create Directory ansible.windows.win_file: - path: C:\Inetpub\wwwroot\reports + path: "{{ doc_root }}\\{{ reports_dir }}" state: directory check_mode: no - name: Enable Directory Browsing ansible.windows.win_powershell: script: | - "Set-WebConfigurationProperty -filter /system.webServer/directoryBrowse -name enabled -value true -PSPath 'IIS:\Sites\Default Web Site\reports'" \ No newline at end of file + "Set-WebConfigurationProperty -filter /system.webServer/directoryBrowse -name enabled -value true -PSPath 'IIS:\Sites\Default Web Site\reports'" diff --git a/collections/ansible_collections/demo/patching/roles/report_server/tasks/linux_landing_page.yml b/collections/ansible_collections/demo/patching/roles/report_server/tasks/linux_landing_page.yml new file mode 100644 index 0000000..30419e3 --- /dev/null +++ b/collections/ansible_collections/demo/patching/roles/report_server/tasks/linux_landing_page.yml @@ -0,0 +1,34 @@ +--- +- include_vars: "{{ ansible_system }}.yml" + +- name: get reports + ansible.builtin.find: + paths: "{{ doc_root }}/{{ reports_dir }}" + patterns: '*.html' + register: reports + check_mode: no + +- name: publish landing page + ansible.builtin.template: + src: linux_report.j2 + dest: "{{ doc_root }}/index.html" + check_mode: no + +- name: copy CSS over + ansible.builtin.copy: + src: "css" + dest: "{{ doc_root }}" + directory_mode: true + check_mode: no + +- name: copy logos over + ansible.builtin.copy: + src: "{{ item }}" + dest: "{{ doc_root }}" + directory_mode: true + loop: + - "webpage_logo.png" + - "redhat-ansible-logo.svg" + - "report.png" + check_mode: no + diff --git a/collections/ansible_collections/demo/patching/roles/report_server/tasks/main.yml b/collections/ansible_collections/demo/patching/roles/report_server/tasks/main.yml new file mode 100644 index 0000000..a275ceb --- /dev/null +++ b/collections/ansible_collections/demo/patching/roles/report_server/tasks/main.yml @@ -0,0 +1,6 @@ +--- +- include_tasks: apache.yml + when: ansible_system == 'Linux' + +- include_tasks: iis.yml + when: ansible_system == 'Win32NT' diff --git a/collections/ansible_collections/demo/patching/roles/report_server/tasks/windows_landing_page.yml b/collections/ansible_collections/demo/patching/roles/report_server/tasks/windows_landing_page.yml new file mode 100644 index 0000000..76574c9 --- /dev/null +++ b/collections/ansible_collections/demo/patching/roles/report_server/tasks/windows_landing_page.yml @@ -0,0 +1,34 @@ +--- +- include_vars: "{{ ansible_system }}.yml" + +- name: get reports + ansible.windows.win_find: + paths: "{{ doc_root }}/{{ reports_dir }}" + patterns: '*.html' + register: reports + check_mode: no + +- name: publish landing page + ansible.builtin.win_template: + src: windows_report.j2 + dest: "{{ doc_root }}/index.html" + check_mode: no + +- name: copy CSS over + ansible.builtin.win_copy: + src: "css" + dest: "{{ doc_root }}" + directory_mode: true + check_mode: no + +- name: copy logos over + ansible.builtin.win_copy: + src: "{{ item }}" + dest: "{{ doc_root }}" + directory_mode: true + loop: + - "webpage_logo.png" + - "redhat-ansible-logo.svg" + - "report.png" + check_mode: no + diff --git a/collections/ansible_collections/demo/patching/roles/report_server/templates/header.j2 b/collections/ansible_collections/demo/patching/roles/report_server/templates/header.j2 new file mode 100644 index 0000000..6d504d0 --- /dev/null +++ b/collections/ansible_collections/demo/patching/roles/report_server/templates/header.j2 @@ -0,0 +1,15 @@ + + +
|
+
+
+ |
+ + {{ page }} + | +{% endfor %} +
Created with
+|
+
+
+ |
+ + {{ page }} + | +{% endfor %} +
Created with
+