Skip to content

Commit ebc2249

Browse files
committed
Merge branch 'feature/crt_passphrase_check' of github.com:NETWAYS/ansible-collection-elasticstack into feature/crt_passphrase_check
2 parents 7f7ce15 + c01a203 commit ebc2249

File tree

48 files changed

+434
-404
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+434
-404
lines changed

.github/workflows/test_full_stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
strategy:
3333
fail-fast: false
34-
max-parallel: 4
34+
max-parallel: 2
3535
matrix:
3636
distro:
3737
- rockylinux8

.github/workflows/test_roles_pr.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ on:
3030
- 'roles/**'
3131
- '.github/workflows/test_roles_pr.yml'
3232
- 'molecule/elasticstack_default/**'
33+
merge_group:
3334

3435
jobs:
3536
lint_full:
@@ -47,11 +48,11 @@ jobs:
4748

4849
strategy:
4950
fail-fast: false
50-
max-parallel: 4
51+
max-parallel: 2
5152
matrix:
5253
distro:
53-
- ubuntu2204
5454
- rockylinux8
55+
- ubuntu2204
5556
scenario:
5657
- elasticstack_default
5758
release:

README.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,34 @@ collections:
3535

3636
You will need the following Ansible collections installed
3737

38-
* community.general (probably already present)
38+
* `community.general` (probably already present)
39+
40+
You will need these packages / libraries installed. Some very basic packages like `openssl` get handled by the collection if needed. The following list contains packages and libraries which only apply to special cases or need for you to decide on the installation method.
41+
42+
* `passlib` Python library if you do not disable password hashing for logstash user and you want to use logstash role from this collection. It should be installed with pip on the Ansible controller.
3943

4044
You may want the following Ansible roles installed. There other ways to achieve what they are doing but using them is easy and convenient.
4145

42-
* geerlingguy.redis
43-
* openssl if you want to use Elastic Security
46+
* `geerlingguy.redis` if you want to use logstash role
4447

4548
### Supported systems
4649

4750
We test the collection on the following Linux distributions. Each one with Elastic Stack 7 and 8.
4851

52+
* Rocky Linux 9
4953
* Rocky Linux 8
50-
* Ubuntu 20.04 LTS
5154
* Ubuntu 22.04 LTS
55+
* Ubuntu 20.04 LTS
5256
* Debian 11
57+
* Debian 10
58+
* CentOS 8
5359

5460
We know from personal experience, that the collections work in following combinations. Missing tests mostly come from incompatibilties between the distribution and our testing environment, not from problems with the collection itself.
5561

5662
* CentOS 7 - Elastic Stack 7
5763

5864
### Known Issues
5965

60-
There are known issues with the following Linux distributions.
61-
62-
* Rocky Linux 9: The GnuPG key used by Elastic seems to be incompatible with this version of Rocky.
6366

6467
## Usage
6568

@@ -69,6 +72,8 @@ Make sure all hosts that should be configured are part of your playbook. (See be
6972

7073
You will want to have reliable DNS resolution or enter all hosts of the stack into your systems hosts files.
7174

75+
The variable `elasticstack_no_log` can be set to `false` if you want to see the output of all tasks. It defaults to `true` because some tasks could reveal passwords in production.
76+
7277
### Versioning
7378

7479
*elasticstack_version*: Version number of tools to install. Only set if you don't want the latest. (default: none).

docs/role-beats.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Requirements
1010

1111
You need to have the beats you want to install available in your software repositories. We provide a [role](./role-repos.md) for just that but if you have other ways of managing software, just make sure it's available. Alternatively you can install the Beats yourself.
1212

13-
* `cryptography` >= 2.5
1413
* `community.crypto` collection: ansible-galaxy collection install community.crypto
1514

1615
Role Variables
@@ -87,7 +86,6 @@ beats_filebeat_journald_inputs:
8786
* *beats_loglevel*: Level of logging (for all beats) (Default: `info`)
8887
* *beats_logpath*: If logging to file, where to put logfiles (Default: `/var/log/beats`)
8988
* *beats_fields*: Fields that are added to every input in the configuration
90-
* *beats_manage_unzip*: Install `unzip` via package manager (Default: `true`)
9189

9290
The following variables only apply if you use this role together with our other Elastic Stack roles.
9391

docs/role-elasticsearch.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ If you use the role to set up security you, can use its CA to create certificate
99

1010
Please note that setting `elasticsearch_bootstrap_pw` as variable will only take effect when initialising Elasticsearch. Changes after starting elasticsearch for the first time will not change the bootstrap password for the instance and will lead to breaking tests.
1111

12-
Requirements
13-
------------
14-
15-
* `cryptography` >= 2.5
16-
1712
Role Variables
1813
--------------
1914

docs/role-kibana.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ Ansible Role: Kibana
55

66
This roles installs and configures Kibana.
77

8-
Requirements
9-
------------
10-
11-
* `cryptography` >= 2.5
12-
138
Role Variables
149
--------------
1510

@@ -18,6 +13,7 @@ Role Variables
1813
* *kibana_tls*: Whether to offer `https` for clients or not (default: `false`)
1914
* *kibana_tls_cert*: Path to the certificate Kibana should show to its clients (default: `/etc/kibana/certs/cert.pem`)
2015
* *kibana_tls_key*: Path to the key Kibana should use when communicating with clients (default: `/etc/kibana/certs/key.pem`)
16+
* *kibana_extra_config*: You can add arbitraty configuration options with this option. Just start it with `|-` and indent the following lines. So you can add as many lines and options to `kibana.yml` as you like. (default: none)
2117

2218
* *kibana_security*: Activate TLS and authentication when connecting to Elasticsearch. **Note**: Only works when `elasticstack_full_stack` is enabled. (default: `true`)
2319

docs/role-logstash.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ Requirements
1919
------------
2020

2121
* `community.general` collection
22-
* `cryptography` >= 2.5
22+
23+
You will need these packages / libraries installed. Some very basic packages like `openssl` get handled by the collection if needed. The following list contains packages and libraries which only apply to special cases or need for you to decide on the installation method.
24+
25+
* `passlib` Python library if you do not disable password hashing for logstash user. It should be installed with pip on the Ansible controller.
2326

2427
You need to have the Elastic Repos configured on your system. You can use our [role](./role-repos.md)
2528

@@ -67,6 +70,9 @@ Aside from `logstash.yml` we can manage Logstashs pipelines.
6770
* *logstash_security*: Enable X-Security (No default set, but will be activated when in full stack mode)
6871
* *logstash_user*: Name of the user to connect to Elasticsearch (Default: `logstash_writer`)
6972
* *logstash_password_hash*: Generate and use a hash from your `logstash_password` (default: `true`)
73+
* *logstash_password_hash_algorithm*: Password hashing algorithms. Value must be same as `xpack.security.authc.password_hashing.algorithm` (default: `bcrypt`)
74+
* *logstash_password_salt_length*: base64 encoded Salt character lenght. This value must be integer and must be compatible to the selected password hashing algorithms (default: `22`)
75+
* *logstash_password_hash_salt_seed*: A seed to generate random but idempotent salt on the elasticstack ca host. The salt will be used to create idempotent logstash hashed user password (default: `SeedChangeMe`)
7076
* *logstash_password*: Password of Elasticsearch user. It must be at least 6 characters long (default: `password`)
7177
* *logstash_user_indices*: Indices the user has access to (default: `'"ecs-logstash*", "logstash*", "logs*"'`)
7278
* *logstash_reset_writer_role*: Reset user and role with every run: (default: `true`)

molecule/beats_default/converge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
elasticsearch_jna_workaround: true
1313
elasticsearch_disable_systemcallfilterchecks: true
1414
elasticstack_release: "{{ lookup('env', 'ELASTIC_RELEASE') | int}}"
15+
elasticstack_no_log: false
1516
tasks:
1617
- name: Include Elastics repos role
1718
ansible.builtin.include_role:

molecule/beats_peculiar/converge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
elasticsearch_jna_workaround: true
2222
elasticsearch_disable_systemcallfilterchecks: true
2323
elasticstack_full_stack: false
24+
elasticstack_no_log: false
2425
beats_filebeat_mysql_slowlog_input: true
2526
beats_auditbeat: true
2627
beats_auditbeat_output: logstash

molecule/elasticsearch_cluster-oss/converge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
elasticsearch_disable_systemcallfilterchecks: true
1212
elasticstack_release: 7
1313
elasticsearch_heap: "1"
14+
elasticstack_no_log: false
1415
tasks:
1516
- name: Include Elastics repos role
1617
ansible.builtin.include_role:

0 commit comments

Comments
 (0)