-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from punktDe/dev
De-couple the role from the built-in Solr service (use supervisord instead)
- Loading branch information
Showing
29 changed files
with
490 additions
and
167 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,11 +1,28 @@ | ||
--- | ||
skip_list: | ||
- 'risky-shell-pipe' | ||
- 'role-name' | ||
- 'name[template]' | ||
- meta-no-info | ||
- var-naming[no-role-prefix] | ||
- name[template] | ||
|
||
warn_list: | ||
- package-latest | ||
- unnamed-task | ||
- command-instead-of-shell | ||
- no-handler | ||
|
||
exclude_paths: | ||
- group_vars/secrets.* | ||
- roles/dehydrated | ||
- roles/mailhog | ||
- roles/postgresql | ||
- roles/mail | ||
- roles/mariadb | ||
- roles/nginx | ||
- roles/elasticsearch | ||
- roles/oauth2_proxy | ||
- roles/php | ||
- roles/redis | ||
- roles/supervisord | ||
- roles/system | ||
- roles/apache | ||
- roles/solr | ||
- roles/varnish | ||
- roles/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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# EditorConfig: http://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# 2 space indentation for YAML | ||
[{*.yml,*.yaml}] | ||
indent_style = space | ||
indent_size = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
if [ -n "$$DIRENV_DIFF" ]; then | ||
# Do not `set -e` unless we're being run from direnv | ||
set -e | ||
fi | ||
|
||
if [ ! -f .venv/bin/activate ] | ||
then | ||
echo "Creating a virtual Python environment" | ||
python3 -m venv .venv >/dev/null | ||
fi | ||
|
||
if [ -f .venv/bin/activate ] | ||
then | ||
echo "Activating the Python virtual environment" | ||
. .venv/bin/activate | ||
fi | ||
|
||
if [ -f .venv/bin/pip3 ] | ||
then | ||
echo "Installing Python requirements" | ||
.venv/bin/pip3 install --upgrade pip 1> /dev/null | ||
.venv/bin/pip3 install -r requirements.txt 1> /dev/null | ||
fi |
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,14 @@ | ||
.DS_Store | ||
*.pyc | ||
__pycache__ | ||
.idea | ||
.vscode | ||
/*.retry | ||
/.fact_cache | ||
/venv/ | ||
debug.log | ||
id_ed25519* | ||
/venv*/ | ||
.collections | ||
roles | ||
.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 @@ | ||
--- | ||
repos: | ||
- repo: https://github.com/ansible/ansible-lint.git | ||
rev: v6.17.2 | ||
rev: v24.6.1 | ||
hooks: | ||
- id: ansible-lint | ||
files: \.(yaml|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,33 +1,15 @@ | ||
--- | ||
# Based on ansible-lint config | ||
extends: default | ||
|
||
rules: | ||
line-length: disable | ||
truthy: | ||
allowed-values: ['true', 'false', 'yes', 'no'] | ||
comments: | ||
min-spaces-from-content: 1 | ||
braces: | ||
min-spaces-inside: 0 | ||
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 | ||
|
||
ignore: | | ||
.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,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2017 punkt.de GmbH | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[defaults] | ||
roles_path = ./roles | ||
collections_path = ./.collections | ||
|
||
[ssh_connection] | ||
pipelining = true |
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,13 +1,13 @@ | ||
--- | ||
solr: | ||
domain: | ||
url: | ||
prefix: | ||
bin: /var/solr | ||
var: /var/db/solr | ||
version: 9.2.0 | ||
bin: /var/opt/solr/solr | ||
home: /var/opt/solr/home | ||
tika: /var/opt/solr/tika | ||
logs: /var/log/solr-ansible | ||
version: 9.7.0 | ||
tika: | ||
prefix: | ||
bin: /var/opt/tika | ||
version: 2.8.0 | ||
synced_config: | ||
version: 3.0.0 | ||
oauth2_proxy: | ||
overwrite_home: no |
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,10 +1,24 @@ | ||
--- | ||
galaxy_info: | ||
author: "Punkt.de" | ||
license: "" | ||
description: "Ansible role for Solr" | ||
role_name: "proserver_solr" | ||
namespace: "punktde" | ||
min_ansible_version: "2.15" | ||
|
||
dependencies: | ||
- role: dehydrated | ||
- role: nginx | ||
when: inventory_hostname in groups.nginx or not inventory_hostname in groups.apache | ||
when: | ||
- groups.nginx is defined | ||
- (inventory_hostname in groups.nginx or not inventory_hostname in groups.apache) | ||
- role: apache | ||
when: inventory_hostname in groups.apache | ||
when: | ||
- groups.apache is defined | ||
- inventory_hostname in groups.apache | ||
- role: oauth2_proxy | ||
when: solr.oauth2_proxy is defined and solr.oauth2_proxy | ||
when: | ||
- solr.oauth2_proxy is defined | ||
- solr.oauth2_proxy | ||
- role: supervisord |
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,27 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: instance | ||
image: geerlingguy/docker-ubuntu2204-ansible | ||
command: /lib/systemd/systemd | ||
pre_build_image: true | ||
privileged: true | ||
cgroupns_mode: host | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
provisioner: | ||
name: ansible | ||
playbooks: | ||
converge: ${MOLECULE_PLAYBOOK:-converge.yml} | ||
verifier: | ||
name: ansible | ||
scenario: | ||
name: default | ||
test_sequence: | ||
- destroy | ||
- create | ||
- converge | ||
- verify |
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,8 @@ | ||
--- | ||
- name: Verify | ||
hosts: all | ||
gather_facts: false | ||
tasks: | ||
- name: Example assertion | ||
ansible.builtin.assert: | ||
that: true |
Oops, something went wrong.