-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Clean up ansible-lint and yamllint issues #106
Merged
+133
−119
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[flake8] | ||
# Recommend matching the black line length (default 88), | ||
# rather than using the flake8 default of 79: | ||
max-line-length = 88 | ||
extend-ignore = | ||
# See https://github.com/PyCQA/pycodestyle/issues/373 | ||
E203, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
ko_fi: sleepingkyoto | ||
custom: | ||
- "https://monappy.jp/u/lae" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
.vscode/ | ||
.history | ||
*.retry | ||
*.code-workspace | ||
*.code-workspace | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
netbox_config: | ||
#SECRET_KEY: "hLk3ED%o#P0teb&UjKN)Quvr=SW$HcM^Z(Rzy_sBXFfpY+5TVC" # let this be generated by the role so you don't have to store it | ||
# SECRET_KEY: "hLk3ED%o#P0teb&UjKN)Quvr=SW$HcM^Z(Rzy_sBXFfpY+5TVC" # let this be generated by the role so you don't have to store it | ||
ALLOWED_HOSTS: | ||
- 127.0.0.1 | ||
- localhost | ||
|
@@ -17,22 +17,22 @@ netbox_config: | |
- Dale Gribble | ||
- [email protected] | ||
# note that the array is nested above | ||
BANNER_BOTTOM: *BANNER_TOP | ||
BANNER_BOTTOM: '*BANNER_TOP' | ||
BANNER_LOGIN: '' | ||
BANNER_TOP: &BANNER_TOP 'Your banner text' | ||
# you probably won't need this, but you can reference other variables like above | ||
BASE_PATH: netbox/ | ||
CACHE_TIMEOUT: 900 | ||
CHANGELOG_RETENTION: 90 | ||
CORS_ORIGIN_ALLOW_ALL: False | ||
#CORS_ORIGIN_REGEX_WHITELIST: | ||
CORS_ORIGIN_ALLOW_ALL: false | ||
# CORS_ORIGIN_REGEX_WHITELIST: | ||
CORS_ORIGIN_WHITELIST: | ||
- hostname.domain.example | ||
DATE_FORMAT: N j, Y | ||
DATETIME_FORMAT: 'N j, Y g:i a' | ||
DEBUG: yes | ||
DEBUG: true | ||
# yes, no, false, true, False, True are all valid booleans in Ansible - they will be inserted correctly in configuration.py | ||
ENFORCE_GLOBAL_UNIQUE: False | ||
ENFORCE_GLOBAL_UNIQUE: false | ||
EMAIL: | ||
SERVER: localhost | ||
PORT: 25 | ||
|
@@ -48,7 +48,7 @@ netbox_config: | |
- ::1 | ||
LOGGING: | ||
version: 1 | ||
disable_existing_loggers: False | ||
disable_existing_loggers: false | ||
handlers: | ||
console: | ||
class: logging.StreamHandler | ||
|
@@ -57,19 +57,19 @@ netbox_config: | |
handlers: | ||
- console | ||
level: INFO | ||
LOGIN_REQUIRED: yes | ||
LOGIN_REQUIRED: true | ||
LOGIN_TIMEOUT: 1209600 | ||
MAINTENANCE_MODE: False | ||
MAINTENANCE_MODE: false | ||
MAX_PAGE_SIZE: 500 | ||
MEDIA_ROOT: /srv/netbox_media | ||
METRICS_ENABLED: True | ||
METRICS_ENABLED: true | ||
NAPALM_USERNAME: netbox | ||
NAPALM_PASSWORD: NetBox42 | ||
NAPALM_TIMEOUT: 30 | ||
NAPALM_ARGS: | ||
keepalive: 60 | ||
PAGINATE_COUNT: 100 | ||
PREFER_IPV4: False | ||
PREFER_IPV4: false | ||
REPORTS_ROOT: /srv/netbox_reports | ||
SESSION_FILE_PATH: "{{ netbox_shared_path }}/sessions" | ||
# quotes aren't necessary as you can see - but in my opinion quotes make this more readable | ||
|
@@ -78,4 +78,4 @@ netbox_config: | |
SHORT_TIME_FORMAT: 'H:i:s' | ||
TIME_FORMAT: 'g:i a' | ||
TIME_ZONE: UTC | ||
WEBHOOKS_ENABLED: False | ||
WEBHOOKS_ENABLED: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change the value? It's a reference to another value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this thing passes to jinja2? If so it must be the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean?
My understanding is that Ansible parses the YAML first, so here I think it was supposed to reference the value of the BANNER_TOP key and that value itself would get passed to Jinja for templating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... I don't know how it working. Where does the variable for
BANNER_BOTTOM
come from?There is a problem if leave everything as is (without quotes).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the reference creation needs to be placed further above. I think? e.g.:
(but also, it's an example so I'm not sure if the linter should be parsing it)