-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintenance/lint with recent rules (#363)
* Re-enable ansible-lint as dependency and a linter in molecule * Remove version constraint on molecule as schema validation is fixed in 4.0.3 * ignore possible venvs for linting * Fix all errors/warning reported by ansible lint * jinja spacing * schema in meta/main.yaml * tasks/playbooks names related warnings / errors * file permissions not set in modules * name/when/block key order * FQCNs for every module * Disable molecule dependency manager as we have no deps * Added pre-commit configuration and configured some plugins. Let them do their job * Black now reformats python code * new line at end automatically added * trailing spaces automatically removed * Use python f-strings wherever possible
- Loading branch information
1 parent
df33938
commit f836c34
Showing
50 changed files
with
527 additions
and
456 deletions.
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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
--- | ||
skip_list: | ||
- role-name | ||
- meta-no-info | ||
- role-name |
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,2 +1,5 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
extend-exclude = | ||
venv, | ||
.venv |
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,7 @@ | ||
.idea/ | ||
*.iml | ||
.venv | ||
venv | ||
molecule/**/.molecule/ | ||
molecule/**/__pycache__/ | ||
molecule/**/.cache | ||
|
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,24 @@ | ||
--- | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/ansible-community/ansible-lint | ||
rev: v6.9.1 | ||
hooks: | ||
- id: ansible-lint | ||
additional_dependencies: | ||
- keyring | ||
- jmespath | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.10.0 | ||
hooks: | ||
- id: black |
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,9 @@ | ||
--- | ||
extends: default | ||
|
||
ignore-from-file: | ||
.gitignore | ||
|
||
rules: | ||
indentation: | ||
spaces: 2 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,65 @@ | ||
--- | ||
- name: systemd-reload | ||
systemd: | ||
- name: Reload systemd | ||
ansible.builtin.systemd: | ||
daemon-reload: yes | ||
name: nexus.service | ||
listen: systemd-reload | ||
|
||
- name: nexus systemd service restart | ||
systemd: | ||
- name: Nexus systemd service restart | ||
ansible.builtin.systemd: | ||
name: nexus.service | ||
state: restarted | ||
no_block: yes | ||
listen: nexus-service-restart | ||
when: "ansible_service_mgr == 'systemd'" | ||
|
||
- name: nexus sysv service restart | ||
service: | ||
- name: Nexus sysv service restart | ||
ansible.builtin.service: | ||
name: nexus | ||
state: restarted | ||
listen: nexus-service-restart | ||
when: "ansible_service_mgr != 'systemd'" | ||
|
||
- name: nexus systemd service stop | ||
systemd: | ||
- name: Nexus systemd service stop | ||
ansible.builtin.systemd: | ||
name: nexus.service | ||
state: stopped | ||
listen: nexus-service-stop | ||
when: nexus_systemd_service_file.stat.exists | ||
|
||
- name: nexus sysv service stop | ||
service: | ||
- name: Nexus sysv service stop | ||
ansible.builtin.service: | ||
name: nexus | ||
state: stopped | ||
listen: nexus-service-stop | ||
when: nexus_sysv_service_file.stat.exists | ||
|
||
- name: wait-for-nexus | ||
wait_for: | ||
- name: Wait for Nexus to start | ||
ansible.builtin.wait_for: | ||
path: "{{ nexus_data_dir }}/log/nexus.log" | ||
search_regex: "Started Sonatype Nexus .*" | ||
timeout: 1800 | ||
listen: wait-for-nexus | ||
|
||
- name: wait-for-nexus-port | ||
wait_for: | ||
- name: Wait for Nexus port to be available | ||
ansible.builtin.wait_for: | ||
port: "{{ nexus_default_port }}" | ||
timeout: "{{ nexus_wait_for_port_timeout | default(omit) }}" | ||
retries: "{{ nexus_wait_for_port_retries | default(omit) }}" | ||
register: wait_for_result | ||
until: wait_for_result is success | ||
listen: wait-for-nexus-port | ||
|
||
- name: httpd-service-reload | ||
systemd: | ||
- name: Reload Apache service | ||
ansible.builtin.systemd: | ||
name: "{{ httpd_package_name }}.service" | ||
state: reloaded | ||
enabled: yes | ||
no_block: yes | ||
listen: httpd-service-reload | ||
|
||
- name: wait-for-httpd | ||
wait_for: | ||
- name: Wait for Apache port to be available | ||
ansible.builtin.wait_for: | ||
port: 443 | ||
delay: 5 | ||
listen: wait-for-httpd |
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,2 +1,3 @@ | ||
--- | ||
- import_playbook: ../default-converge.yml | ||
- name: Import default converge playbook | ||
import_playbook: ../default-converge.yml |
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,7 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
enabled: False | ||
|
||
driver: | ||
name: docker | ||
|
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,2 +1,3 @@ | ||
--- | ||
- import_playbook: ../default-converge.yml | ||
- name: Import default converge playbook | ||
import_playbook: ../default-converge.yml |
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,7 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
enabled: False | ||
|
||
driver: | ||
name: docker | ||
|
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,2 +1,3 @@ | ||
--- | ||
- import_playbook: ../default-converge.yml | ||
- name: Import default converge playbook | ||
import_playbook: ../default-converge.yml |
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,7 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
enabled: False | ||
|
||
driver: | ||
name: docker | ||
|
Oops, something went wrong.