lint fixes

This commit is contained in:
willtome
2023-03-07 16:55:34 -05:00
parent 745b755296
commit 40c31d8e6e
64 changed files with 583 additions and 578 deletions

View File

@@ -4,26 +4,26 @@ satellite_content_views:
- name: RHEL7
content_view: RHEL7
repositories:
- name: Red Hat Enterprise Linux 7 Server (RPMs)
basearch: x86_64
releasever: 7Server
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
basearch: x86_64
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Satellite Tools 6.8 (for RHEL 7 Server) (RPMs)
basearch: x86_64
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Enterprise Linux 7 Server (RPMs)
basearch: x86_64
releasever: 7Server
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Enterprise Linux 7 Server - Extras (RPMs)
basearch: x86_64
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Satellite Tools 6.8 (for RHEL 7 Server) (RPMs)
basearch: x86_64
product: 'Red Hat Enterprise Linux Server'
# Red Hat Enterprise Linux 8
- name: RHEL8
content_view: RHEL8
content_view_update: true
repositories:
- name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
releasever: 8
product: Red Hat Enterprise Linux for x86_64
- name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
releasever: 8
product: Red Hat Enterprise Linux for x86_64
- name: Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (RPMs)
product: Red Hat Enterprise Linux for x86_64
- name: Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)
releasever: 8
product: Red Hat Enterprise Linux for x86_64
- name: Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
releasever: 8
product: Red Hat Enterprise Linux for x86_64
- name: Red Hat Satellite Tools 6.8 for RHEL 8 x86_64 (RPMs)
product: Red Hat Enterprise Linux for x86_64

View File

@@ -1,7 +1,8 @@
---
- hosts: localhost
- name: Promote content view version
hosts: localhost
connection: local
gather_facts: no
gather_facts: false
vars:
organization: Default Organization
lifecycle_environment: undef
@@ -9,9 +10,9 @@
content_view: undef
tasks:
- name: Promote Content View
redhat.satellite.content_view_version:
content_view: "{{ content_view }}"
organization: "{{ organization }}"
lifecycle_environments: "{{ lifecycle_environment }}"
current_lifecycle_environment: "{{ current_lifecycle_environment }}"
- name: Promote Content View # noqa: args[module] - required parameters provided with environment vars
redhat.satellite.content_view_version:
content_view: "{{ content_view }}"
organization: "{{ organization }}"
lifecycle_environments: "{{ lifecycle_environment }}"
current_lifecycle_environment: "{{ current_lifecycle_environment }}"

View File

@@ -1,7 +1,8 @@
---
- hosts: localhost
- name: Publish content view version
hosts: localhost
connection: local
gather_facts: no
gather_facts: false
vars:
content_view: undef
env: undef
@@ -11,11 +12,11 @@
publish_retry_interval: 15
tasks:
- name: publish content view
redhat.satellite.content_view_version:
content_view: "{{ content_view }}"
organization: "{{ organization }}"
lifecycle_environments: "{{ lifecycle_environment }}"
- name: Publish content view # noqa: args[module] - required parameters provided with environment vars
redhat.satellite.content_view_version:
content_view: "{{ content_view }}"
organization: "{{ organization }}"
lifecycle_environments: "{{ lifecycle_environment }}"
# async: "{{ publish_timeout }}"
# poll: 0
# register: publish_async

View File

@@ -12,6 +12,8 @@
ansible.builtin.pause: seconds="{{ 5 | random }}"
- name: Run SCAP Scan
ansible.builtin.shell: "/usr/bin/foreman_scap_client {{ item.id }}"
ansible.builtin.command: "/usr/bin/foreman_scap_client {{ item.id }}"
loop: "{{ policy }}"
when: policy_scan == 'all' or item.name in policy_scan
register: scap_cmd_output
failed_when: "'Error' in command_result.stderr"

View File

@@ -51,148 +51,148 @@ controller_credentials:
password: ansible123!
controller_inventory_sources:
- name: Satellite Inventory
inventory: Workshop Inventory
credential: Satellite Inventory
source: satellite6
update_on_launch: false
execution_environment: Control Plane Execution Environment
overwrite: true
source_vars:
hostnames:
- name.split('.')[0]
groups:
patch_bugs: foreman_content_facet_attributes.errata_counts.bugfix
patch_enhancements: foreman_content_facet_attributes.errata_counts.enhancement
patch_security: foreman_content_facet_attributes.errata_counts.security
keyed_groups:
- prefix: env
key: foreman_content_facet_attributes.lifecycle_environment_name
- prefix: cv
key: foreman_content_facet_attributes.content_view_name
- prefix: os
key: foreman_operatingsystem_name
- prefix: scap
key: foreman_compliance_status_label
validate_certs: no
- name: Satellite Inventory
inventory: Workshop Inventory
credential: Satellite Inventory
source: satellite6
update_on_launch: false
execution_environment: Control Plane Execution Environment
overwrite: true
source_vars:
hostnames:
- name.split('.')[0]
groups:
patch_bugs: foreman_content_facet_attributes.errata_counts.bugfix
patch_enhancements: foreman_content_facet_attributes.errata_counts.enhancement
patch_security: foreman_content_facet_attributes.errata_counts.security
keyed_groups:
- prefix: env
key: foreman_content_facet_attributes.lifecycle_environment_name
- prefix: cv
key: foreman_content_facet_attributes.content_view_name
- prefix: os
key: foreman_operatingsystem_name
- prefix: scap
key: foreman_compliance_status_label
validate_certs: false
controller_templates:
- name: LINUX / Register with Satellite
project: Ansible official demo project
playbook: satellite/server_register.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Workshop Credential
- Satellite Credential
extra_vars:
org_id: "Default_Organization"
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Server Name or Pattern
type: text
variable: HOSTS
required: false
- question_name: Choose Environment
type: multiplechoice
variable: env
choices:
- Dev
- QA
- Prod
required: true
- name: LINUX / Register with Satellite
project: Ansible official demo project
playbook: satellite/server_register.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Workshop Credential
- Satellite Credential
extra_vars:
org_id: "Default_Organization"
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Server Name or Pattern
type: text
variable: HOSTS
required: false
- question_name: Choose Environment
type: multiplechoice
variable: env
choices:
- Dev
- QA
- Prod
required: true
- name: LINUX / Compliance Scan with Satellite
project: Ansible official demo project
playbook: satellite/server_openscap.yml
inventory: Workshop Inventory
execution_environment: Ansible Engine 2.9 execution environment
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
- Workshop Credential
extra_vars:
policy_scan: all
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Server Name or Pattern
type: text
variable: HOSTS
required: false
- name: LINUX / Compliance Scan with Satellite
project: Ansible official demo project
playbook: satellite/server_openscap.yml
inventory: Workshop Inventory
execution_environment: Ansible Engine 2.9 execution environment
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
- Workshop Credential
extra_vars:
policy_scan: all
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Server Name or Pattern
type: text
variable: HOSTS
required: false
- name: SATELLITE / Publish Content View Version
project: Ansible official demo project
playbook: satellite/satellite_publish.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
extra_vars:
env: Dev
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Select Content View
variable: content_view
type: multiplechoice
choices: "{{ satellite_content_views | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- name: SATELLITE / Publish Content View Version
project: Ansible official demo project
playbook: satellite/satellite_publish.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
extra_vars:
env: Dev
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Select Content View
variable: content_view
type: multiplechoice
choices: "{{ satellite_content_views | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- name: SATELLITE / Promote Content View Version
project: Ansible official demo project
playbook: satellite/satellite_promote.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Select Content View
variable: content_view
type: multiplechoice
choices: "{{ satellite_content_views | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- question_name: Current Lifecycle Environment
variable: current_lifecycle_environment
type: multiplechoice
choices: "{{ satellite_lifecycle_environments | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- question_name: Next Lifecycle Environment
variable: lifecycle_environment
type: multiplechoice
choices: "{{ satellite_lifecycle_environments | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- name: SATELLITE / Promote Content View Version
project: Ansible official demo project
playbook: satellite/satellite_promote.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: Select Content View
variable: content_view
type: multiplechoice
choices: "{{ satellite_content_views | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- question_name: Current Lifecycle Environment
variable: current_lifecycle_environment
type: multiplechoice
choices: "{{ satellite_lifecycle_environments | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- question_name: Next Lifecycle Environment
variable: lifecycle_environment
type: multiplechoice
choices: "{{ satellite_lifecycle_environments | selectattr('name', 'match', '^RHEL.*$') | map(attribute='name') | list}}"
required: true
- name: SETUP / Satellite
project: Ansible official demo project
playbook: satellite/setup_satellite.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
- name: SETUP / Satellite
project: Ansible official demo project
playbook: satellite/setup_satellite.yml
inventory: Workshop Inventory
notification_templates_started: Telemetry
notification_templates_success: Telemetry
notification_templates_error: Telemetry
credentials:
- Satellite Credential
controller_launch_jobs:
- name: SETUP
wait: false
@@ -207,7 +207,7 @@ controller_launch_jobs:
######################
satellite_components:
- content_views
#- content_view_publish
# - content_view_publish
- lifecycle_environments
- activation_keys
@@ -219,12 +219,12 @@ satellite_content_views:
- name: RHEL7
content_view: RHEL7
repositories:
- name: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Satellite Client 6 for RHEL 7 Server RPMs x86_64
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Enterprise Linux 7 Server - Extras RPMs x86_64
product: 'Red Hat Enterprise Linux Server'
- name: Red Hat Satellite Client 6 for RHEL 7 Server RPMs x86_64
product: 'Red Hat Enterprise Linux Server'
# Red Hat Enterprise Linux 8
- name: RHEL8
content_view: RHEL8

View File

@@ -1,54 +1,55 @@
---
- hosts: localhost
gather_facts: no
- name: Setup satellite configuration
hosts: localhost
gather_facts: false
vars_files: setup.yml
vars:
refresh_satellite_manifest: true
tasks:
- name: refresh manifest
redhat.satellite.subscription_manifest:
organization: "Default Organization"
state: refreshed
when: refresh_satellite_manifest
- name: Refresh manifest # noqa: args[module] - required parameters provided with environment vars
redhat.satellite.subscription_manifest:
organization: "Default Organization"
state: refreshed
when: refresh_satellite_manifest
- name: Setup CV
include_role:
name: redhat.satellite.content_views
- name: Setup CV
ansible.builtin.include_role:
name: redhat.satellite.content_views
- name: Publish CV
include_role:
name: redhat.satellite.content_view_publish
vars:
satellite_content_views:
- RHEL7
- RHEL8
- name: Publish CV
ansible.builtin.include_role:
name: redhat.satellite.content_view_publish
vars:
satellite_content_views:
- RHEL7
- RHEL8
- name: Setup Lifecycle Environment
include_role:
name: redhat.satellite.lifecycle_environments
- name: Setup Lifecycle Environment
ansible.builtin.include_role:
name: redhat.satellite.lifecycle_environments
- name: redhat.satellite.content_view_publish CV
redhat.satellite.content_view_version:
organization: "{{ satellite_organization }}"
content_view: "{{ item }}"
lifecycle_environments:
- "{{ item }}_Dev"
- "{{ item }}_QA"
- "{{ item }}_Prod"
loop:
- RHEL7
- RHEL8
- name: Content view publish # noqa: args[module] - required parameters provided with environment vars
redhat.satellite.content_view_version:
organization: "{{ satellite_organization }}"
content_view: "{{ item }}"
lifecycle_environments:
- "{{ item }}_Dev"
- "{{ item }}_QA"
- "{{ item }}_Prod"
loop:
- RHEL7
- RHEL8
- name: Setup activation_keys
include_role:
name: redhat.satellite.activation_keys
- name: Setup activation_keys
ansible.builtin.include_role:
name: redhat.satellite.activation_keys
- name: Add SCAP Tailoring File
redhat.satellite.scap_tailoring_file:
name: RHEL7_STIG
organizations: "{{ satellite_organization }}"
scap_file: "{{ item }}"
loop:
- files/ssg-rhel7-ds-tailoring.xml
- files/ssg-rhel8-ds-tailoring-stig-gui.xml
- name: Add SCAP Tailoring File # noqa: args[module] - required parameters provided with environment vars
redhat.satellite.scap_tailoring_file:
name: RHEL7_STIG
organizations: "{{ satellite_organization }}"
scap_file: "{{ item }}"
loop:
- files/ssg-rhel7-ds-tailoring.xml
- files/ssg-rhel8-ds-tailoring-stig-gui.xml