Skip to content

Commit

Permalink
Improve call of ansible-lint (#1255)
Browse files Browse the repository at this point in the history
* Allow Eslint with config in package.json #1205

* Allow to check prop existence in active_only_if_file_found

* Lint fix

* Fix ansible-lint test cases

quick build push

* [MegaLinter] Apply linters fixes

* Fix ansible test cases (2)

* Fix ansible test cases (2)

quick build push

* Fix call to ansible-lint

* Build

* Install ansible-lint using pip

* Update ansible-lint test cases

* Count errors & update ansible-lint test cases

* [MegaLinter] Apply linters fixes

* Move .ansible-lint at the good location

Co-authored-by: Vitalii Tverdokhlib <v@nitra.ai>
Co-authored-by: nvuillam <nvuillam@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 7, 2022
1 parent 2a0d1be commit 392fcb8
Show file tree
Hide file tree
Showing 61 changed files with 1,952 additions and 194 deletions.
1 change: 0 additions & 1 deletion .automation/generated/linter-versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"actionlint": "1.6.8",
"ansible-lint": "0.0.0",
"arm-ttk": "0.0.0",
"bandit": "1.7.2",
"bash-exec": "5.1.0",
Expand Down
7 changes: 0 additions & 7 deletions .automation/test/ansible/ansible/reports/expected-ANSIBLE.tap

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@ quiet: true
################
# Tags to skip #
################
skip_list:
- '602' # Allow compare to empty string
- '106' # Role name
- '204' # Allow string length greater than 160 chars
- '301' # False positives for running command shells
- '303' # Allow git commands for push, add, etc...
- '305' # Allow use of shell when you want
- '503' # Allow step to run like handler
skip_list:
- "602" # Allow compare to empty string
- "204" # Allow string length greater that 160 chars
- "301" # False positives for running command shells
- "303" # Allow git commands for push add, etc...
- "305" # Allow use of shell when you want
- "503" # Allow step to run like handler
- "command-instead-of-module"
- "yaml"

##################
# Tags to follow #
Expand Down
182 changes: 182 additions & 0 deletions .automation/test/ansible/good/ansible/ghe-initialize/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
---
##########################################
##########################################
## Standard Variables for GHE Configure ##
##########################################
##########################################
## These variables will be the defaults. If you want to override them,
## then change them in 'vars/main.yml' instead of here
github_admin_password: U53r1234
github_initial_user_password: U53r1234
github_host: github.service
github_admin_port: 8443

#####################
# Default Rate Vars #
#####################
api_rate_limiting_enabled: "true"
api_rate_limiting_unauthenticated_rate_limit: "60"
api_rate_limiting_default_rate_limit: "5000"
api_rate_limiting_search_unauthenticated_rate_limit: "10"
api_rate_limiting_search_default_rate_limit: "30"
api_rate_limiting_lfs_unauthenticated_rate_limit: "100"
api_rate_limiting_lfs_default_rate_limit: "3000"
api_rate_limiting_graphql_unauthenticated_rate_limit: "0"
api_rate_limiting_graphql_default_rate_limit: "5000"

######################
# Default Abuse Vars #
######################
abuse_rate_limiting_enabled: "true"
abuse_rate_limiting_requests_per_minute: "900"
abuse_rate_limiting_cpu_millis_per_minute: "90000"
abuse_rate_limiting_search_cpu_millis_per_minute: "7500"

####################
# Default Cas Vars #
####################
cas_url: "null"

#########################
# Default Collectd Vars #
#########################
collectd_enabled: "true"
collectd_server: "metrics.service"
collectd_port: "25826"
collectd_encryption: "null"
collectd_username: "null"
collectd_password: "null"

#####################
# Default Core Vars #
#####################
core_private_mode: "true"
core_public_pages: "false"
core_subdomain_isolation: "false"
core_signup_enabled: "false"
core_github_hostname: "null"
core_http_proxy: "null"
core_http_noproxy: "null"
core_builtin_auth_fallback: "false"
core_expire_sessions: "false"
core_package_version: "null"

#######################
# Default GitHub Vars #
#######################
github_ssl_enabled: "true"
github_ssl_tls_mode: "tlsv12"
github_ssl_cert: "null"
github_ssl_key: "null"

#########################
# Default Governor Vars #
#########################
governor_quotas_enabled: "false"
governor_limit_user: "null"
governor_limit_network: "null"

#####################
# Default LDAP Vars #
#####################
ldap_host: "null"
ldap_port: "389"
ldap_method: "None"
ldap_base_dn: "dc=demo,dc=github,dc=local"
ldap_bind_dn: "cn=admin,dc=demo,dc=github,dc=local"
ldap_password: "U53r1234"
ldap_user_groups: "null"
ldap_admin_group: "Autobots"
ldap_user_sync_emails: "true"
ldap_user_sync_keys: "false"
ldap_user_sync_gpg_keys: "false"
ldap_user_sync_interval: "1"
ldap_team_sync_interval: "1"
ldap_sync_enabled: "true"
ldap_profile_uid: "uid"
ldap_profile_name: "displayName"
ldap_profile_mail: "mail"
ldap_profile_key: "null"
ldap_profile_gpg_key: "null"

#############################
# Default Loadbalancer Vars #
#############################
loadbalancer_http_forward: "false"
loadbalancer_proxy_protocol: "false"

########################
# Default Mapping Vars #
########################
mapping_enabled: "false"
mapping_tileserver: "null"
mapping_basemap: "null"
mapping_token: "null"

####################
# Default NTP Vars #
####################
ntp_primary_server: "0.ubuntu.pool.ntp.org"
ntp_secondary_server: "1.ubuntu.pool.ntp.org"

##########################
# Default GHE Pages Vars #
##########################
pages_enabled: "true"

#####################
# Default SAML Vars #
#####################
saml_sso_url: "null"
saml_certificate: "null"
saml_certificate_path: "/data/user/common/idp.crt"
saml_issuer: "null"
saml_name_id_format: "persistent"
saml_idp_initiated_sso: "false"
saml_disable_admin_demote: "false"
saml_signature_method: "rsa-sha256"
saml_digest_method: "sha256"
saml_username_attribute: "null"
saml_full_name_attribute: "full_name"
saml_emails_attribute: "emails"
saml_ssh_keys_attribute: "public_keys"
saml_gpg_keys_attribute: "gpg_keys"

#####################
# Default SMTP Vars #
#####################
smtp_enabled: "false"
smtp_address: "null"
smtp_authentication: "null"
smtp_port: "0"
smtp_domain: "null"
smtp_username: "null"
smtp_user_name: "null"
smtp_password: "null"
smtp_support_address: it.broke@github.com
smtp_support_address_type: email
smtp_noreply_address: "noreply@test.github.local"
smtp_discard_to_noreply_address: "false"

#####################
# Default SNMP Vars #
#####################
snmp_enabled: "true"
snmp_version: "2"
snmp_community: "public"
snmp_users: "null"

#######################
# Default Syslog Vars #
#######################
syslog_enabled: "false"
syslog_server: "null"
syslog_protocol_name: "udp"
syslog_tls_enabled: "false"
syslog_cert: "null"

#######################
# Default Splunk Vars #
#######################
splunk_host: splunk.service
splunk_port: 9997
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"private_mode": false,
"signup_enabled": true,
"github_hostname": "github-test.local",
"github_ssl": {
"enabled": false,
"cert": null,
"key": null
},
"auth_mode": "default"
}
Loading

0 comments on commit 392fcb8

Please sign in to comment.