Skip to content

Commit 21c6b34

Browse files
committed
Migrate to Rocky Linux 9
1 parent e0d6571 commit 21c6b34

File tree

90 files changed

+373
-951
lines changed

Some content is hidden

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

90 files changed

+373
-951
lines changed

ansible.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
[defaults]
2-
ansible_python_interpreter = python
3-
42
remote_user = root
53
host_key_checking = no
64

group_vars/all.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,7 @@ mageops_language_redirect_enable: no
698698
mageops_language_redirect_mode: normal
699699

700700
# Configure a vmtouch daemon force-keeping magento sources / compiled opcache in RAM
701-
mageops_magento_preload_fscache_enable: >-
702-
{{ ( ansible_memtotal_mb | default(512, true) | int >= 7168 )
703-
and php_cli_opcache_file_cache_enable | default(false, true) }}
701+
mageops_magento_preload_fscache_enable: no
704702

705703
# Tune Linux Virtual Memory kernel sysctl params for lower disk IO
706704
mageops_app_node_optimize_kernel_vm_io: yes
@@ -1304,7 +1302,7 @@ php_fpm_pool_name: "{{ mageops_app_type }}"
13041302

13051303
php_fpm_umask: "{{ mageops_app_umask }}"
13061304

1307-
php_fpm_run_dir_path: "/var/run/php-fpm"
1305+
php_fpm_run_dir_path: "/run/php-fpm"
13081306
php_fpm_log_dir_path: "/var/log/php-fpm"
13091307

13101308
php_fpm_pool_conf_dir_path: "/etc/php-fpm.d"
@@ -1530,7 +1528,7 @@ https_termination_proxy_http_port: "{{ https_termination_hide_varnish | default(
15301528
https_termination_proxy_read_timeout: "{{ mageops_http_pipeline_request_timeout_override }}"
15311529

15321530
# Special logging setup for requests for cacheable HTML pages which were a cache MISS
1533-
https_termination_page_cache_misses_logging: yes
1531+
https_termination_page_cache_misses_logging: no
15341532
https_termination_page_cache_misses_logfile: "{{ nginx_log_dir }}/access.page-cache-misses.json.log"
15351533

15361534
https_termination_redirect_source_domain_param: _redirect_from
@@ -1746,10 +1744,10 @@ deploy_release_save_info_file_path: "{{ mageops_ansible_temp_dir }}/RELEASE.json
17461744
# --------------------------------------
17471745

17481746
# Whether to install and enable the earlyoom daemon
1749-
mageops_earlyoom_enable: yes
1747+
mageops_earlyoom_enable: no
17501748

17511749
earlyoom_ram_min_percent: 7
1752-
earlyoom_swap_min_percent: 40
1750+
earlyoom_swap_min_percent: 10
17531751
mageops_cli_features_dir: /usr/local/lib/mageops/features
17541752

17551753
# ----------------------------
@@ -1768,11 +1766,8 @@ mageops_packages_banned:
17681766

17691767
# Basic packages needed for ansible/provisioning
17701768
mageops_packages_base:
1771-
- python
1772-
- python2-pip
1773-
- python2-PyMySQL
1774-
- yum-utils
1775-
- yum-plugin-verify
1769+
- python3-pip
1770+
- python3-PyMySQL
17761771
- unzip
17771772
- git
17781773
- rsync
@@ -1846,7 +1841,8 @@ packages_remove: "{{ mageops_packages_banned }}"
18461841
# Package locks, for more info, check cs.versionlock role
18471842

18481843
# Package locks per instance
1849-
versionlock_varnish_packages: []
1844+
versionlock_varnish_packages:
1845+
- varnish-6.0.*
18501846
versionlock_persistent_packages: []
18511847
versionlock_app_node_packages: []
18521848

requirements-galaxy.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
roles:
12
- src: geerlingguy.mysql
23
- src: geerlingguy.composer
34
- src: geerlingguy.ntp
@@ -8,9 +9,7 @@
89
- src: pinkeen.postfix-relay
910
version: v1.1
1011

11-
- src: pinkeen.selinux-disable
12-
version: v1.1
13-
14-
- src: zauberpony.mysql-query
15-
version: v0.6.1
16-
12+
collections:
13+
- name: community.aws
14+
- name: amazon.aws
15+
- name: community.mysql

requirements-python.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ansible>=2.9.16,<2.10
1+
ansible>=6,<7
22

33
# some tasks call aws command on localhost
44
# make sure this is BEFORE boto3 and boto
Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,2 @@
11
allow_duplicates: no
22
dependencies: []
3-
4-
galaxy_info:
5-
author: Filip Sobalski <[email protected]>
6-
description: A collection of ansible plugins
7-
company: creativestyle Polska
8-
license: license (BSD, MIT)
9-
min_ansible_version: 2.7
10-
galaxy_tags:
11-
- plugins
12-
- filters
13-
- filter_plugins
14-
- ansible
15-
- meta
16-
- library
17-
18-

roles/cs.aws-ami-facts/defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ami_facts_common_filters:
1414
# Find the latest CentOS ami ids here: https://www.centos.org/download/aws-images/
1515
ami_centos7_id:
1616
# eu-central-1: ami-08b6d44b4f6f7b279 # original
17-
eu-central-1: ami-0e4f9c05326f650df # cs-centos7-update-2022-08-01
17+
eu-central-1: ami-06a38f9c5f75d09bd # rocky 9.0.20220706
1818

1919
ami_base_system_image_id: "{{ ami_centos7_id[aws_region | default('eu-central-1')] }}"
2020

roles/cs.aws-ami-facts/tasks/find-app-node-ami.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
- name: Find app node AMIs
2-
ec2_ami_facts:
2+
amazon.aws.ec2_ami_info:
33
region: "{{ aws_region }}"
44
filters: >-
55
{{ ami_facts_common_filters | combine(
6-
ami_facts_app_node_base_filters,
7-
ami_facts_app_node_filters,
6+
ami_facts_app_node_base_filters,
7+
ami_facts_app_node_filters,
88
ami_facts_app_node_tag_filters) }}
99
vars:
1010
ami_facts_app_node_tag_filters: "{{ ami_facts_app_node_tags | prefix_keys('tag:') }}"
@@ -22,7 +22,7 @@
2222
aws_ami_app_node_id: "{{ aws_ami_app_node_info.image_id }}"
2323
aws_ami_app_node_name: "{{ aws_ami_app_node_info.name }}"
2424
aws_ami_app_node_location: "{{ aws_ami_app_node_info.image_location }}"
25-
aws_ami_app_node_needs_db_migrations: "{{ aws_ami_app_node_info.tags.NeedsDbMigrations | default('true') | from_json }}"
25+
aws_ami_app_node_needs_db_migrations: "{{ aws_ami_app_node_info.tags.NeedsDbMigrations | default('true') | from_json }}"
2626
aws_ami_app_node_artifact_build_nr: "{{ aws_ami_app_node_info.tags.ArtifactBuildNr | default('null') | from_json }}"
2727

2828
- name: Print information about newest app node AMI found
@@ -31,10 +31,10 @@
3131
msg: |
3232
===============================================================
3333
= Found App Node AMI =
34-
===============================================================
34+
===============================================================
3535
3636
{% if ami_facts_app_node_force_id %}Note: Using forced specific AMI id.{% endif %}
37-
37+
3838
{{ aws_ami_app_node_name }} ({{ aws_ami_app_node_id }})
3939
4040
Baked App artifact build: #{{ aws_ami_app_node_artifact_build_nr | default('unknown', true) }}
@@ -50,4 +50,4 @@
5050
- name: Print information if no images were found
5151
when: ami_app_node_facts.images | length == 0
5252
debug:
53-
msg: "No previous app node AMI was found! Clean build is coming..."
53+
msg: "No previous app node AMI was found! Clean build is coming..."

roles/cs.aws-ami-facts/tasks/find-clean-base-ami.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Find clean base AMIs
2-
ec2_ami_facts:
2+
amazon.aws.ec2_ami_info:
33
region: "{{ aws_region }}"
44
filters: "{{ ami_facts_common_filters | combine(ami_facts_clean_base_filters) }}"
55
register: ami_clean_base_facts
@@ -30,5 +30,5 @@
3030
({{ aws_ami_clean_base_location }})
3131
3232
--- Details ---
33-
34-
{{ aws_ami_clean_base_info | to_nice_yaml }}
33+
34+
{{ aws_ami_clean_base_info | to_nice_yaml }}

roles/cs.aws-cli/tasks/main.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
1-
- name: Make sure pip aws is not installed
2-
pip:
3-
name: awscli
4-
state: absent
1+
# - name: Make sure pip aws is not installed
2+
# pip:
3+
# name: awscli
4+
# state: absent
55

66
- name: Install awscli
7-
yum:
7+
ansible.builtin.package:
88
name: awscli
9-
enablerepo: mageops
109
state: latest
1110

1211
- name: Ensure default AWS Region is set
1312
ini_file:
1413
path: /root/.aws/credentials
1514
section: default
1615
option: region
17-
value: "{{ aws_region }}"
16+
value: "{{ aws_region }}"

roles/cs.aws-cloudfront-facts/tasks/main.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
- name: Get list of cloudfront distributions
2-
cloudfront_facts:
2+
community.aws.cloudfront_info:
33
region: "{{ aws_region }}"
4+
summary: yes
45
register: cloudfront_distributions_info
56

67
- name: Set list of cloudfront distributions
78
set_fact:
8-
aws_cloudfront_distributions: "{{ cloudfront_distributions_info.ansible_facts.cloudfront.summary.distributions }}"
9-
9+
aws_cloudfront_distributions: "{{ cloudfront_distributions_info.cloudfront.summary.distributions }}"
10+
1011
- name: Filter cloudfront distribution list by tags
1112
set_fact:
1213
aws_cloudfront_distributions: "{{ aws_cloudfront_distributions | json_query(distributions_tag_filter_query) }}"
1314
vars:
1415
distributions_tag_filter_query: "[?{% for k, v in aws_cloudfront_distribution_tags.items() -%}Tags.{{ k }} == '{{ v }}'{% if not loop.last %} && {% endif %}{% endfor %}]"
15-
16+
1617
- name: Warn when more than one distribution has been found
1718
debug:
1819
msg: |
@@ -31,4 +32,4 @@
3132
debug:
3233
msg: |
3334
Using Cloudfront Distribution: {{ aws_cloudfront_distribution_id }} with domain {{ aws_cloudfront_distribution_domain }}
34-
when: aws_cloudfront_distributions | length > 0
35+
when: aws_cloudfront_distributions | length > 0

roles/cs.aws-ebs-vol/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@
9090
loop_control:
9191
loop_var: volume
9292
label: "{{ volume.VolumeId }} / {{ volume | pick_keys(aws_ebs_volume_modify_params.keys()) | to_yaml | trim }} -> {{ aws_ebs_volume_modify_params | to_yaml| trim }}"
93-
loop: "{{ ( aws_ebs_volume_describe.stdout | from_json ).Volumes }}"
93+
loop: "{{ ( aws_ebs_volume_describe.stdout | from_json ).Volumes }}"

roles/cs.aws-ec2-cleanup/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Get available Lauch Configurations
2-
ec2_lc_facts:
2+
community.aws.ec2_lc_info:
33
region: "{{ aws_region }}"
44
sort: created_time
55
sort_order: descending

roles/cs.aws-lambda-cloudfront/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
region: "{{ aws_cloudfront_lambda_region }}"
2828

2929
- name: Get lambda versions
30-
lambda_facts:
30+
community.aws.lambda_info:
3131
function_name: "{{ aws_lambda_cloudfront_name }}"
3232
query: versions
3333
region: "{{ aws_cloudfront_lambda_region }}"

roles/cs.aws-lambda-import/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ aws_import_scaling_lambda_schedule: rate(5 minutes)
33
aws_lambda_handle_import_scaling_name: "handleImportScaling-{{ mageops_app_name }}"
44
aws_lambda_handle_import_scaling_runtime: python3.7
55

6-
aws_lambda_import_scaling_deploy_package_version: "1.7.0"
6+
aws_lambda_import_scaling_deploy_package_version: "1.7.1"
77
aws_lambda_import_scaling_deploy_package_url: "https://github.com/mageops/aws-lambdas-autoscaling/releases/download/{{ aws_lambda_import_scaling_deploy_package_version }}/autoscaling-lambdas-deploy-package.python3.7.zip"
8-
aws_lambda_import_scaling_deploy_package_path: "{{ mageops_ansible_temp_dir }}/import-scaling-lambda-deploy-package-{{ aws_lambda_import_scaling_deploy_package_version }}.zip"
8+
aws_lambda_import_scaling_deploy_package_path: "{{ mageops_ansible_temp_dir }}/import-scaling-lambda-deploy-package-{{ aws_lambda_import_scaling_deploy_package_version }}.zip"

roles/cs.aws-lambda-varnish/defaults/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
aws_lambda_varnish_deploy_package_url: "https://github.com/mageops/aws-lambdas-autoscaling/releases/download/1.6.0/autoscaling-lambdas-deploy-package.python3.7.zip"
2-
aws_lambda_varnish_deploy_package_path: "{{ mageops_ansible_temp_dir }}/varnish-lambda-deploy-package.zip"
1+
aws_lambda_varnish_deploy_package_url: "https://github.com/mageops/aws-lambdas-autoscaling/releases/download/1.7.1/autoscaling-lambdas-deploy-package.python3.7.zip"
2+
aws_lambda_varnish_deploy_package_path: "{{ mageops_ansible_temp_dir }}/varnish-lambda-deploy-package-f44a1b91479964bca0e73e222c1c004f08e87a3c.zip"
33
aws_lambda_varnish_runtime: python3.7
44

55
aws_lambda_handle_varnish_autoscaling_event_name: "handleVarnishAutoscalingEvent-{{ mageops_app_name }}"

roles/cs.aws-node-ami-builder/tasks/main.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,12 @@
4747
vars:
4848
aws_ebs_volume_modify_ids: >-
4949
{{ ( builder_ec2.instances + builder_ec2.tagged_instances )
50-
| map(attribute='block_device_mapping')
51-
| map('dict2items')
52-
| flatten
50+
| map(attribute='block_device_mapping')
51+
| map('dict2items')
52+
| flatten
5353
| map(attribute='value')
5454
| map(attribute='volume_id')
55-
| list
56-
| to_nice_json }}
55+
| list }}
5756
aws_ebs_volume_modify_type: "{{ aws_builder_node_ebs_volume_type }}"
5857
aws_ebs_volume_modify_iops: "{{ aws_builder_node_ebs_gp3_iops }}"
5958
aws_ebs_volume_modify_throughput: "{{ aws_builder_node_ebs_gp3_throughput }}"

roles/cs.aws-node-facts/tasks/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
aws_app_builder_node_ami_id: "{{ aws_nodes_info.app_builder.image_id | default(omit, true) }}"
4747
aws_persistent_node_ami_id: "{{ aws_nodes_info.persistent.image_id | default(omit, true) }}"
4848
aws_varnish_node_ami_id: "{{ aws_nodes_info.varnish_loadbalancer.image_id | default(omit, true) }}"
49+
# Ansible require at least one variable to be set in set_fact, this dummy set is required in case there is no instances present
50+
_dummy: "_"
4951

5052
- name: Set varnish host to varnish loadbalancer
5153
set_fact:

roles/cs.aws-node-persistent/tasks/main.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,13 @@
6060
name: cs.aws-ebs-vol
6161
vars:
6262
aws_ebs_volume_modify_ids: >-
63-
{{ ( aws_persistent_ec2.instances + aws_persistent_ec2.tagged_instances )
64-
| map(attribute='block_device_mapping')
65-
| map('dict2items')
66-
| flatten
63+
{{ ( aws_persistent_ec2.instances + aws_persistent_ec2.tagged_instances )
64+
| map(attribute='block_device_mapping')
65+
| map('dict2items')
66+
| flatten
6767
| map(attribute='value')
6868
| map(attribute='volume_id')
69-
| list
70-
| to_nice_json }}
69+
| list }}
7170
aws_ebs_volume_modify_type: "{{ aws_persistent_node_ebs_volume_type }}"
7271
aws_ebs_volume_modify_iops: "{{ aws_persistent_node_ebs_gp3_iops }}"
7372
aws_ebs_volume_modify_throughput: "{{ aws_persistent_node_ebs_gp3_throughput }}"

roles/cs.aws-node-varnish/tasks/main.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,12 @@
4949
vars:
5050
aws_ebs_volume_modify_ids: >-
5151
{{ ( aws_varnish_ec2.instances + aws_varnish_ec2.tagged_instances )
52-
| map(attribute='block_device_mapping')
53-
| map('dict2items')
54-
| flatten
52+
| map(attribute='block_device_mapping')
53+
| map('dict2items')
54+
| flatten
5555
| map(attribute='value')
5656
| map(attribute='volume_id')
57-
| list
58-
| to_nice_json }}
57+
| list }}
5958
aws_ebs_volume_modify_type: "{{ aws_varnish_node_ebs_volume_type }}"
6059
aws_ebs_volume_modify_iops: "{{ aws_varnish_node_ebs_gp3_iops }}"
6160
aws_ebs_volume_modify_throughput: "{{ aws_varnish_node_ebs_gp3_throughput }}"

roles/cs.aws-rds-facts/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Get list of RDS instances
2-
rds_instance_facts:
2+
community.aws.rds_instance_info:
33
region: "{{ aws_region }}"
44
register: rds_instances_info
55

roles/cs.aws-rds-gfs-backup/tasks/main.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
when: rds_gfs_instance_id is not defined
55

66
- name: Get facts about RDS instance
7-
rds_instance_facts:
7+
community.aws.rds_instance_info:
88
db_instance_identifier: "{{ rds_gfs_instance_id }}"
99
region: "{{ aws_region }}"
1010
register: rds_gfs_instance_data
@@ -45,5 +45,3 @@
4545

4646
- import_tasks: cluster-db.yml
4747
when: rds_gfs_cluster_id != False
48-
49-

roles/cs.aws-region-facts/tasks/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
- name: Get AWS region
2-
aws_region_facts:
2+
community.aws.aws_region_info:
33
region: "{{ aws_region }}"
44
register: region_facts
55

@@ -42,4 +42,3 @@
4242
set_fact:
4343
aws_s3_website_endpoint: "{{ aws_s3_website_info.website_endpoint }}"
4444
cacheable: yes
45-

0 commit comments

Comments
 (0)