Skip to content

Commit 3d8baaf

Browse files
authored
Merge pull request #2618 from codeenigma/opcache_vars_v2-PR-devel-2.x
Opcache vars v2 pr devel 2.x
2 parents 9715fac + 488dfc1 commit 3d8baaf

File tree

20 files changed

+123
-33
lines changed

20 files changed

+123
-33
lines changed

docs/_Sidebar.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
- [Docker Registry](/roles/debian/docker_registry)
6363
- [Duplicity](/roles/debian/duplicity)
6464
- [Firewall Config](/roles/debian/firewall_config)
65+
- [Fluent-bit](/roles/debian/fluent-bit)
6566
- [Frontail](/roles/debian/frontail)
6667
- [Gitlab](/roles/debian/gitlab)
6768
- [Gitlab Runner](/roles/debian/gitlab_runner)

docs/roles/aws/aws_ec2_with_eip.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Creates a new EC2 instance at AWS with a static IP address.
1212
aws_ec2_with_eip:
1313
aws_profile: "{{ _aws_profile }}"
1414
region: "{{ _aws_region }}"
15-
hostname: "{{ _domain_name }}" # The hostname is used to check if the machine exists already.
15+
hostname: "{{ _aws_resource_name }}" # The hostname is used to check if the machine exists already.
1616
force: false # Force a new EC2 machine to be created if a new AMI is packed.
1717
instance_type: t3.micro
1818
key_name: "{{ ce_provision.username }}@{{ ansible_hostname }}" # This needs to match your "provision" user SSH key.
@@ -37,6 +37,7 @@ aws_ec2_with_eip:
3737
root_volume_delete_on_termination: true
3838
ebs_optimized: true
3939
security_groups: [] # list of security group names, converted to IDs by aws_security_groups role
40+
public_ip: true # usually this needs to be true for cloud-init to work
4041
tags:
4142
Name: "{{ _domain_name }}"
4243
# Add an A record tied to the EIP.

docs/roles/aws/aws_vpc.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ _common_security_groups:
7878
- 22
7979
cidr_ip: 0.0.0.0/0
8080
rule_desc: Allow all incoming tcp traffic on port 22.
81+
rules_egress: []
8182
web_open:
8283
name: web_open
8384
description: Allow all incoming web traffic on ports 80 and 443.
@@ -88,6 +89,7 @@ _common_security_groups:
8889
- 443
8990
cidr_ip: 0.0.0.0/0
9091
rule_desc: Allow all incoming tcp traffic on ports 80 and 443.
92+
rules_egress: []
9193
mailpit_open:
9294
name: mailpit_open
9395
description: Allow all incoming traffic on port 8025 for Mailpit.
@@ -97,6 +99,7 @@ _common_security_groups:
9799
- 8025
98100
cidr_ip: 0.0.0.0/0
99101
rule_desc: Allow all incoming tcp traffic on port 8025.
102+
rules_egress: []
100103
ftp_open:
101104
name: ftp_open
102105
description: Allow all incoming traffic on ports 20 and 21 for FTP.
@@ -107,6 +110,7 @@ _common_security_groups:
107110
- 21
108111
cidr_ip: 0.0.0.0/0
109112
rule_desc: Allow all incoming tcp traffic on ports 20 and 21.
113+
rules_egress: []
110114
sftp_open:
111115
name: sftp_open
112116
description: Allow all incoming traffic on ports 989 and 990 for sFTP.
@@ -117,6 +121,7 @@ _common_security_groups:
117121
- 990
118122
cidr_ip: 0.0.0.0/0
119123
rule_desc: Allow all incoming tcp traffic on ports 989 and 990.
124+
rules_egress: []
120125
ossec:
121126
name: ossec
122127
description: Allow all incoming traffic on ports 1514 and 1515 for OSSEC.
@@ -127,6 +132,7 @@ _common_security_groups:
127132
- 1515
128133
cidr_ip: 0.0.0.0/0
129134
rule_desc: Allow all incoming udp traffic on ports 1514 and 1515.
135+
rules_egress: []
130136
openvpn:
131137
name: openvpn
132138
description: Allow all incoming traffic on port 1194 for OpenVPN.
@@ -136,6 +142,7 @@ _common_security_groups:
136142
- 1194
137143
cidr_ip: 0.0.0.0/0
138144
rule_desc: Allow all incoming udp traffic on port 1194.
145+
rules_egress: []
139146

140147
```
141148

docs/roles/debian/apt_unattended_upgrades.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ _apt_unattended_upgrades_default_origins:
5252
- "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"
5353
apt_unattended_upgrades:
5454
enable: true
55+
linotp: "false"
5556
# unattended-upgrades template vars.
5657
# booleans must be strings to avoid Jinja2 interpretting.
5758
origins: "{{ _apt_unattended_upgrades_default_origins }}"

docs/roles/debian/fluent-bit.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Fluent-bit
2+
3+
## Description
4+
5+
Deploy [Fluent-bit](https://github.com/fluent/fluent-bit) using ansible.
6+
7+
### Requirements
8+
9+
Role expects to be provided with the following information:
10+
* `fluentbit_main_config` - the main Fluent-bit configuration
11+
12+
### Example
13+
Minimum Fluent-bit config that will send a test log, filter it, and output to stdout.
14+
15+
```yaml
16+
fluentbit_main_config:
17+
service:
18+
flush: 5
19+
log_level: info
20+
21+
parsers:
22+
- name: json
23+
format: json
24+
time_key: time
25+
time_format: '%d/%b/%Y:%H:%M:%S %z'
26+
27+
pipeline:
28+
inputs:
29+
- name: dummy
30+
dummy: '{"endpoint":"localhost", "value":"something"}'
31+
tag: dummy
32+
filters:
33+
- name: grep
34+
match: '*'
35+
logical_op: or
36+
regex:
37+
- value something
38+
- value error
39+
outputs:
40+
- name: stdout
41+
42+
```
43+
44+
For more details on setting up the Fluent-bit config, refer to official documentation:
45+
https://docs.fluentbit.io/manual/installation/getting-started-with-fluent-bitexporter
46+
47+
<!--TOC-->
48+
<!--ENDTOC-->
49+
50+
<!--ROLEVARS-->
51+
## Default variables
52+
```yaml
53+
---
54+
# Default variables for Fluent-bit role
55+
fluent_bit_repo_key_url: https://packages.fluentbit.io/fluentbit.key
56+
fluent_bit_key_location: /usr/share/keyrings/fluentbit-keyring.asc
57+
fluent_bit_apt_source: "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.asc] https://packages.fluentbit.io/debian/{{ ansible_distribution_release }} {{ ansible_distribution_release }} main"
58+
fluent_bit_startup_command: /opt/fluent-bit/bin/fluent-bit -c /etc/fluent-bit/fluent-bit.yml
59+
60+
fluent_bit_configuration: ""
61+
62+
```
63+
64+
<!--ENDROLEVARS-->

docs/roles/debian/gitlab.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ gitlab:
109109
redirect_http_to_https: "true" # must be enabled if you're using LetsEncrypt above
110110
redirect_http_to_https_port: 80 # must be 80 if you're using LetsEncrypt above
111111
custom_nginx_config: "" # include extra config, for example "include /etc/nginx/conf.d/example.conf;"
112+
block_removed_ldap_users_on_calendar: "*-*-* 02:30:00"
112113

113114
```
114115

docs/roles/debian/nginx.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ nginx:
2626
worker_connections: 768
2727
http:
2828
server_names_hash_bucket_size: 256
29-
access_log: /var/log/nginx-access.log
30-
error_log: /var/log/nginx-error.log
29+
access_log: /var/log/nginx/nginx-access.log
30+
error_log: /var/log/nginx/nginx-error.log
3131
ssl_protocols: "TLSv1.2 TLSv1.3"
3232
sendfile: "on"
3333
keepalive_timeout: 65

docs/roles/debian/php-fpm.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Installs and configures the PHP-FPM flavour of FastCGI.
44

5+
Note, for legacy reasons this role sets up PHP-FPM to use TCP/IP instead of a Unix socket by default. However, we *recommend* you change this by setting `unix_socket: true` unless you really need to run PHP-FPM over TCP/IP, as a Unix socket is much faster. If you do, be sure to set the `pool_group` variable to match your web server user, or the web server will be unable to interact with PHP.
6+
57
<!--TOC-->
68
<!--ENDTOC-->
79

@@ -13,17 +15,17 @@ php:
1315
# see php-common for default version
1416
fpm:
1517
# FPM settings - official documentation is here: https://www.php.net/manual/en/install.fpm.configuration.php
16-
unix_socket: false # set to true to use a unix socket, you must also update nginx and cachetool if you do
18+
unix_socket: false # set to true to use a unix socket, you must also update nginx and cachetool if you do
1719
server_ip: "127.0.0.1"
18-
tcp_port: "" # leave empty to automate port selection - port will be "90{{ version | replace('.','') }}" - e.g. 9081 for PHP 8.1
19-
pool_user: "{{ user_deploy.username }}"
20-
pool_group: "{{ user_deploy.username }}" # if using unix socket this should be the web server user
20+
tcp_port: "" # leave empty to automate port selection - port will be "90{{ version | replace('.','') }}" - e.g. 9081 for PHP 8.1
21+
pool_user: "{{ user_deploy.username }}" # this should always be the deploy user, usually deploy
22+
pool_group: "{{ user_deploy.username }}" # if using unix socket this should be the web server user, often www-data
2123
pm: dynamic # can also be static, see https://tideways.com/profiler/blog/an-introduction-to-php-fpm-tuning
2224
default_socket_timeout: 60
2325
# It is important to scale up processes on bigger servers, so that more
2426
# requests can be handled. Double the number of vCPUs is a good default.
2527
# Can be between 5 and 64.
26-
max_children: "{{ [5, [(ansible_facts.ansible_processor_nproc | default(1)) * 2, 64] | min] | max }}" # Fallback in case ansible_processor_nproc is not gathered before tasks
28+
max_children: "{{ [10, [(ansible_facts.ansible_processor_nproc | default(1)) * 2, 64] | min] | max }}" # Fallback in case ansible_processor_nproc is not gathered before tasks
2729
start_servers: 2
2830
min_spare_servers: 1
2931
max_spare_servers: 3

docs/roles/debian/user_ansible.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ user_ansible:
1313
# This sets both username and main group.
1414
username: "{{ _user_ansible_username }}"
1515
home: "/home/{{ _user_ansible_username }}"
16-
create: true # if you know the user already exists, set this to false to not create the user.
16+
create: true # if you know the user already exists, set this to false to not create the user.
1717
create_home: true
1818
update_password: "always"
19+
system_user: true # creates a system user - see useradd --system docs
1920
# It is often desirable to fix POSIX IDs for system users so they are consistent across your fleet
2021
# This is shown for documentation, you should do this in your config repo
2122
# uid: 999
2223
# gid: 999
23-
sudo_config: {} # an empty dictionary will skip creating a sudo config
24+
sudo_config: {} # an empty dictionary will skip creating a sudo config
2425
# Example sudo config allowing full sudo permissions - see the debian/sudo_config role for more details.
2526
# entity_name: "{{ _user_ansible_username }}"
2627
# hosts: "ALL"

roles/_meta/webserver/meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ dependencies:
88
- role: debian/nodejs
99
- role: debian/php-cli
1010
- role: debian/php-fpm
11+
- role: debian/php_composer
1112
- role: debian/nginx

0 commit comments

Comments
 (0)