Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #69 from jaredledvina/feature/improve-galaxy-score
Browse files Browse the repository at this point in the history
Feature/improve galaxy score
  • Loading branch information
jaredledvina authored Mar 14, 2019
2 parents 60bc270 + 871b5c5 commit 0117e73
Show file tree
Hide file tree
Showing 13 changed files with 124 additions and 64 deletions.
22 changes: 16 additions & 6 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
---
# https://github.com/ansible/galaxy/blob/devel/galaxy/importer/linters/yamllint.yaml
extends: default

rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
braces: {max-spaces-inside: 1, level: error}
brackets: {max-spaces-inside: 1, level: error}
colons: {max-spaces-after: -1, level: error}
commas: {max-spaces-after: -1, level: error}
comments: disable
comments-indentation: disable
document-start: disable
empty-lines: {max: 3, level: error}
hyphens: {level: error}
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines: {type: unix}
trailing-spaces: disable
truthy: disable
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ansible = "*"
docker-py = "*"

[dev-packages]
molecule = "*"
molecule = "==v2.20a2"

[requires]
python_version = "2.7"
113 changes: 87 additions & 26 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tasks/config/component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
mode: "{{ sensu_go_final_configs[component]['default']['mode'] | default(sensu_go_final_configs.DEFAULT.file_mode) }}"
when: sensu_go_final_configs[component]['default'] is defined

- name: Ensure /etc/sysconfig/sensu-{{component }} is configured
- name: Ensure /etc/sysconfig/sensu-{{ component }} is configured
template:
src: component-sysconfig.j2
dest: "/etc/sysconfig/sensu-{{ component }}"
Expand All @@ -25,7 +25,7 @@
template:
src: component.yml.j2
dest: "{{ sensu_go_config_dir.path }}/{{ sensu_go_final_configs[component]['file']['name'] }}"
owner: "{{ sensu_go_final_configs[component]['file']['owner'] | default(sensu_go_final_configs['DEFAULT']['owner'])}}"
owner: "{{ sensu_go_final_configs[component]['file']['owner'] | default(sensu_go_final_configs['DEFAULT']['owner']) }}"
group: "{{ sensu_go_final_configs[component]['file']['group'] | default(sensu_go_final_configs['DEFAULT']['group']) }}"
mode: "{{ sensu_go_final_configs[component]['file']['mode'] | default(sensu_go_final_configs['DEFAULT']['file_mode']) }}"
when: sensu_go_final_configs[component]['config'] is defined
Expand Down
2 changes: 1 addition & 1 deletion tasks/config/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
- name: Ensure config directory is set up
file:
path: "{{ sensu_go_config_dir.path }}"
owner: "{{ sensu_go_config_dir.owner}}"
owner: "{{ sensu_go_config_dir.owner }}"
group: "{{ sensu_go_config_dir.group }}"
mode: "{{ sensu_go_config_dir.mode }}"
6 changes: 6 additions & 0 deletions tasks/repo/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
- name: Flush handlers
meta: flush_handlers
when: sensu_go_manage_repo or sensu_go_manage_community_repo

- name: Cleanup - Remove old Sensu prerelease repos
file:
path: /etc/yum.repos.d/sensu_prerelease
state: absent
notify: yum-clean-metadata
11 changes: 0 additions & 11 deletions tasks/repo/sensu_community/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,3 @@
sslverify: "{{ sensu_go_final_community_repos[ansible_pkg_mgr]['sslverify'] }}"
metadata_expire: "{{ sensu_go_final_community_repos[ansible_pkg_mgr]['metadata_expire'] }}"
when: sensu_go_final_community_repos[ansible_pkg_mgr]['rpm-src'] is defined

# HACK: https://github.com/ansible/ansible/issues/20711#issuecomment-306260869
# Can be removed once we're running w/ a version of Ansible that has https://github.com/ansible/ansible/pull/35989
- name: Make yum cache to import Sensu Go Community GPG keys
command: "yum -q makecache -y --disablerepo='*' --enablerepo='{{ item }}'"
args:
warn: false
when: sensu_go_import_community_key.changed
with_items:
- sensu_go_community
- sensu_go_community-source
3 changes: 2 additions & 1 deletion tasks/repo/sensu_community/yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@

# HACK: https://github.com/ansible/ansible/issues/20711#issuecomment-306260869
# Can be removed once we're running w/ a version of Ansible that has https://github.com/ansible/ansible/pull/35989
- name: Make yum cache to import Sensu Go Community GPG keys
# Update: Looks like only CentOS 6 requires this hack
- name: Make yum cache to import Sensu Go Community GPG keys # noqa 503 - Order matters for this task
command: "yum -q makecache -y --disablerepo='*' --enablerepo='{{ item }}'"
args:
warn: false
Expand Down
3 changes: 0 additions & 3 deletions tasks/repo/sensu_go/apt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,3 @@
path: /etc/apt/sources.list.ld/sensu_prerelease
state: absent
notify: update apt cache

- name: Flush handlers
meta: flush_handlers
11 changes: 0 additions & 11 deletions tasks/repo/sensu_go/dnf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,3 @@
path: /etc/yum.repos.d/sensu_prerelease
state: absent
notify: yum-clean-metadata

# HACK: https://github.com/ansible/ansible/issues/20711#issuecomment-306260869
# Can be removed once we're running w/ a version of Ansible that has https://github.com/ansible/ansible/pull/35989
- name: Make yum cache to import GPG keys
command: "yum -q makecache -y --disablerepo='*' --enablerepo='{{ item }}'"
args:
warn: false
when: sensu_go_import_key.changed
with_items:
- sensu_go
- sensu_go-source
3 changes: 2 additions & 1 deletion tasks/repo/sensu_go/yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@

# HACK: https://github.com/ansible/ansible/issues/20711#issuecomment-306260869
# Can be removed once we're running w/ a version of Ansible that has https://github.com/ansible/ansible/pull/35989
- name: Make yum cache to import GPG keys
# Update: Looks like only CentOS 6 requires the hack
- name: Make yum cache to import GPG keys # # noqa 503 - Order matters for this task
command: "yum -q makecache -y --disablerepo='*' --enablerepo='{{ item }}'"
args:
warn: false
Expand Down
6 changes: 6 additions & 0 deletions tasks/repo/yum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@
- name: Flush handlers
meta: flush_handlers
when: sensu_go_manage_repo or sensu_go_manage_community_repo

- name: Cleanup - Remove old Sensu prerelease repos
file:
path: /etc/yum.repos.d/sensu_prerelease
state: absent
notify: yum-clean-metadata
2 changes: 1 addition & 1 deletion tasks/service/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- name: Ensure sensu-backend service state
service:
name: sensu-backend
enabled: "{{ sensu_go_final_services.backend.enabled | default(omit)}}"
enabled: "{{ sensu_go_final_services.backend.enabled | default(omit) }}"
state: "{{ sensu_go_final_services.backend.state }}"
register: sensu_go_backend_service_state

Expand Down

0 comments on commit 0117e73

Please sign in to comment.