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

linting #36

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .ansible-lint.yml → .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ skip_list:
warn_list: # or 'skip_list' to silence them completely
- git-latest # Allow for newest git version
- package-latest # Allow newest package version
- risky-file-permissions # File permissions unset or incorrect.
- risky-shell-pipe # Shells that use pipes should set the pipefail option.
- template-instead-of-copy # Templated files should use template instead of copy
- command-instead-of-shell # Use shell only when shell functionality is required.
- var-naming[no-role-prefix] # Because I don't want to follow this rule at this time

# Set verbosity
verbosity: 1
Expand Down
25 changes: 0 additions & 25 deletions .config/ansible-lint.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .yaml-lint.yml → .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ rules:
spaces: 2
indent-sequences: true
check-multi-line-strings: false
key-duplicates: true
new-line-at-end-of-file: true
key-duplicates: enable
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: true
trailing-spaces: {}
truthy:
allowed-values: ['true', 'false']
check-keys: true
Expand Down
20 changes: 10 additions & 10 deletions group_vars/all/aap_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ aap_setup_prep_inv_vars:
# web_server_ssl_key: /path/to/tower.key
pg_password: "{{ ansible_password | default('Password1234!') }}"
pg_host: "{{ aap_db_host | default(aap_setup_prep_inv_nodes['database'][0]) }}"
pg_port: '5432'
pg_database: 'awx'
pg_username: 'awx'
pg_sslmode: 'prefer' # set to 'verify-full' for client-side enforced SSL
pg_port: "5432"
pg_database: awx
pg_username: awx
pg_sslmode: prefer # set to 'verify-full' for client-side enforced SSL
automationhub_admin_password: "{{ ansible_password | default('Password1234!') }}"
# automationhub_importer_settings: ""
automationhub_require_content_approval: true
Expand All @@ -40,18 +40,18 @@ aap_setup_prep_inv_vars:
# automationhub_ssl_key: ""
# automationhub_backup_collections: ""
automationhub_pg_host: "{{ ah_db_host | default(aap_setup_prep_inv_nodes['database'][1]) | default(aap_setup_prep_inv_nodes['database'][0]) }}"
automationhub_pg_port: '5432'
automationhub_pg_database: 'automationhub'
automationhub_pg_username: 'automationhub'
automationhub_pg_port: "5432"
automationhub_pg_database: automationhub
automationhub_pg_username: automationhub
automationhub_pg_password: "{{ ansible_password | default('Password1234!') }}"
automationhub_pg_sslmode: 'prefer' # set to 'verify-full' for client-side enforced SSL
automationhub_pg_sslmode: prefer # set to 'verify-full' for client-side enforced SSL
# sso_keystore_password: "{{ ansible_password | default('Password1234!') }}"
# automationhub_main_url: 'https://automationhub.ansible.com'
automationedacontroller_admin_password: "{{ ansible_password | default('Password1234!') }}"
automationedacontroller_pg_host: "{{ aap_db_host | default(aap_setup_prep_inv_nodes['database'][0]) }}"
automationedacontroller_pg_port: '5432'
automationedacontroller_pg_port: "5432"
automationedacontroller_pg_database: "{{ ah_db_host | default(aap_setup_prep_inv_nodes['database'][1]) | default(aap_setup_prep_inv_nodes['database'][0]) }}"
automationedacontroller_pg_username: 'automationedacontroller'
automationedacontroller_pg_username: automationedacontroller
automationedacontroller_pg_password: "{{ ansible_password | default('Password1234!') }}"
# automation_controller_main_url = ''
# automationedacontroller_controller_verify_ssl = true
Expand Down
4 changes: 2 additions & 2 deletions group_vars/all/ah_collection_namespaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ ah_namespaces:
description: Namespace to test publishing collections
resources: "# Redhat CoP\nA Namespace to test publishing collections"
links:
- name: "Red Hat"
url: "https://www.redhat.com"
- name: Red Hat
url: https://www.redhat.com
...
12 changes: 6 additions & 6 deletions group_vars/all/ah_ee_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ ee_list:
- netaddr
galaxy:
collections:
- infra.controller_configuration
- infra.ah_configuration
- infra.ee_utilities
- infra.aap_utilities
- awx.awx
- infra.controller_configuration
- infra.ah_configuration
- infra.ee_utilities
- infra.aap_utilities
- awx.awx
build_steps:
append_final:
- RUN dnf update -y
...
...
14 changes: 7 additions & 7 deletions group_vars/all/ah_repositories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
ah_collection_remotes:
- name: rh-certified
token: "{{ cloud_token }}"
url: 'https://console.redhat.com/api/automation-hub/content/published/'
auth_url: 'https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token'
url: https://console.redhat.com/api/automation-hub/content/published/
auth_url: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
- name: validated
token: "{{ cloud_token }}"
url: 'https://console.redhat.com/api/automation-hub/content/validated/'
auth_url: 'https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token'
url: https://console.redhat.com/api/automation-hub/content/validated/
auth_url: https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
- name: community
url: 'https://galaxy.ansible.com/api/'
url: https://galaxy.ansible.com/api/
requirements:
- infra.ah_configuration
- infra.controller_configuration
Expand All @@ -29,5 +29,5 @@ ah_collection_repositories:
- name: validated
remote: validated
- name: community
remote: community
...
remote: community
...
2 changes: 1 addition & 1 deletion group_vars/all/ah_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ah_users:
append: true
is_superuser: true
password: "{{ ah_token_password }}"
state: "present"
state: present
...
2 changes: 1 addition & 1 deletion group_vars/all/auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ controller_validate_certs: false
ah_host: "{{ ah_hostname | default(groups['automationhub'][0]) }}"
ah_username: "{{ ah_user | default('admin') }}"
ah_password: "{{ ah_pass }}"
ah_path_prefix: 'galaxy' # this is for private automation hub
ah_path_prefix: galaxy # this is for private automation hub
validate_certs: false

ee_registry_username: "{{ ah_username }}"
Expand Down
4 changes: 2 additions & 2 deletions group_vars/all/credential_types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ controller_credential_types_all:
secret: true
injectors:
env:
MY_CERT_FILE_PATH: !unsafe '{{ tower.filename.cert_file }}'
MY_CERT_FILE_PATH: !unsafe "{{ tower.filename.cert_file }}"
file:
template.cert_file: !unsafe '{{ priv_key }}'
template.cert_file: !unsafe "{{ priv_key }}"
...
24 changes: 12 additions & 12 deletions group_vars/all/credentials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ controller_credentials_all:
credential_type: Ansible Galaxy/Automation Hub API Token
organization: config_as_code
inputs:
url: "https://{{ ah_host }}/api/galaxy/content/rh-certified/"
url: https://{{ ah_host }}/api/galaxy/content/rh-certified/
token: "{{ ah_token }}"

- name: ah_published
credential_type: Ansible Galaxy/Automation Hub API Token
organization: config_as_code
inputs:
url: "https://{{ ah_host }}/api/galaxy/content/published/"
url: https://{{ ah_host }}/api/galaxy/content/published/
token: "{{ ah_token }}"

- name: ah_community
credential_type: Ansible Galaxy/Automation Hub API Token
organization: config_as_code
inputs:
url: "https://{{ ah_host }}/api/galaxy/content/community/"
url: https://{{ ah_host }}/api/galaxy/content/community/
token: "{{ ah_token }}"

- name: cr_ah
Expand All @@ -75,13 +75,13 @@ controller_credentials_all:
inputs:
vault_password: "{{ vault_pass }}"

# here is an example for getting git ssh cred working
# - name: github
# credential_type: Source Control
# organization: config_as_code
# description: github
# inputs:
# username: ""
# ssh_key_data: "{{ ssh_priv_key }}"
# ssh_key_unlock: "{{ ssh_key_unlock }}"
# here is an example for getting git ssh cred working
# - name: github
# credential_type: Source Control
# organization: config_as_code
# description: github
# inputs:
# username: ""
# ssh_key_data: "{{ ssh_priv_key }}"
# ssh_key_unlock: "{{ ssh_key_unlock }}"
...
6 changes: 3 additions & 3 deletions group_vars/all/execution_environments.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
---
controller_execution_environments_all:
- name: "supported"
- name: supported
image: "{{ ah_host }}/ee-supported-rhel8"
pull: always
credential: cr_ah

- name: "minimal"
- name: minimal
image: "{{ ah_host }}/ee-minimal-rhel8"
pull: always
credential: cr_ah

- name: "old_29_ee"
- name: old_29_ee
image: "{{ ah_host }}/ee-29-rhel8"
pull: always
credential: cr_ah
Expand Down
2 changes: 1 addition & 1 deletion group_vars/all/instance_groups.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
controller_instance_groups_all: []
# - name: test_instance_group
...
...
2 changes: 1 addition & 1 deletion group_vars/all/inventory_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ controller_inventory_sources_all:
organization: config_as_code
source: scm
source_project: config_as_code
source_path: "inventory_{{ env }}.yml"
source_path: inventory_{{ env }}.yml
inventory: config_as_code
credential: ""
overwrite: true
Expand Down
2 changes: 1 addition & 1 deletion group_vars/all/organizations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ controller_organizations_all:
- ah_published
- ah_certified
- ah_community
# default_environment: supported
# default_environment: supported

- name: Default
state: absent
Expand Down
2 changes: 1 addition & 1 deletion group_vars/all/schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ controller_schedules_all:
- name: auto_run_console_token_refresh
description: Auto run refresh token every 25 days
unified_job_template: console_token_refresh # NOTE: you cannot have the same job template name as a project or this will fail
rrule: "DTSTART:20191219T130500Z RRULE:INTERVAL=25;FREQ=DAILY"
rrule: DTSTART:20191219T130500Z RRULE:INTERVAL=25;FREQ=DAILY
...
2 changes: 1 addition & 1 deletion group_vars/all/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
controller_user_accounts_all:
- user: api_user
is_superuser: false
password: '{{ controller_api_user_pass }}'
password: "{{ controller_api_user_pass }}"
...
7 changes: 0 additions & 7 deletions group_vars/dev/credential_input_sources.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
---
# Commented out content is serving as example for you to add new content.
controller_credential_input_sources_dev: []
# - source_credential: cyberark
# target_credential: gitlab
# input_field_name: password
# metadata:
# object_query: "Safe=MY_SAFE;Object=AWX-user"
# object_query_format: "Exact"
# description: Fill the gitlab credential from CyberArk
...
5 changes: 0 additions & 5 deletions group_vars/dev/groups.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
controller_groups_dev: []
# - name: group1
# inventory: localhost
# variables:
# some_var: some_val
# ansible_connection: local
...
4 changes: 0 additions & 4 deletions group_vars/dev/hosts.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
controller_hosts_dev: []
# - name: localhost
# inventory: localhost
# variables:
# ansible_connection: local
...
1 change: 0 additions & 1 deletion group_vars/dev/instance_groups.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
controller_instance_groups_dev: []
# - name: test_instance_group
...
2 changes: 1 addition & 1 deletion group_vars/dev/inventory_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ controller_inventory_sources_dev:
organization: config_as_code
source: scm
source_project: config_as_code_dev
source_path: "inventory_{{ env }}.yml"
source_path: inventory_{{ env }}.yml
inventory: config_as_code_dev
credential: ""
overwrite: true
Expand Down
1 change: 0 additions & 1 deletion group_vars/dev/job_templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ controller_templates_dev:
extra_vars:
# for debugging errors with creds change to false
controller_configuration_credentials_secure_logging: true

...
14 changes: 0 additions & 14 deletions group_vars/dev/notifications.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
---
controller_notifications_dev: []
# - name: Email notification differential
# description: Send out emails for tower jobs
# organization: Default
# notification_type: email
# notification_configuration:
# username: '' # this is required even if there's no username
# sender: [email protected]
# recipients:
# - [email protected]
# use_tls: false
# host: smtp.example.com
# use_ssl: false
# password: '' # this is required even if there's no password
# port: 25
...
Loading
Loading