Skip to content
This repository was archived by the owner on Jan 1, 2024. It is now read-only.

Commit b9aabba

Browse files
authored
Fix compatibility with ansible 2.9 (#267)
Before this patch it wasn't possible to run the role using Ansible 2.9. Now all compatibility errors are fixed and role is Ansible 2.9 is tested on CI for each PR before merging into master.
1 parent 4bcc731 commit b9aabba

File tree

6 files changed

+16
-6
lines changed

6 files changed

+16
-6
lines changed

.github/helpers/count_molecule_matrix.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ def main(event_name, repo_owner, review_state, ref):
3737
if event_name == 'workflow_dispatch' or review_state == 'approved' or ref == 'refs/heads/master':
3838
ce_matrix.append(get_ce_params(molecule_scenario='update_cartridge'))
3939
ce_matrix.append(get_ce_params(tarantool_version='1.10'))
40-
# TODO: Uncomment after fix for Ansible version ~=2.9.0
41-
# ce_matrix.append(get_ce_params(ansible_version='2.9.0'))
40+
ce_matrix.append(get_ce_params(ansible_version='2.9.0'))
4241
# TODO: Uncomment after fixing the check mode
4342
# ce_matrix.append(get_ce_version(molecule_command='check'))
4443

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ README.md to use the newest tag with new release
1414

1515
- Removing stateboard instance distribution directory on `rotate_dists` step
1616
- Fixed fail on getting one non-expelled instance when only stateboard instance
17-
is configured.
17+
is configured
18+
- Fixed compatibility with Ansible 2.9
1819

1920
## [1.8.0] - 2021-03-23
2021

filter_plugins/filters.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import os
2+
3+
def path_join(parts):
4+
return os.path.join(*parts)
5+
6+
class FilterModule(object):
7+
def filters(self):
8+
return {
9+
'cartridge_path_join': path_join,
10+
}

tasks/steps/blocks/create_systemd_unit_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- name: 'Place systemd units files'
2323
template:
2424
src: '{{ systemd_unit.template }}'
25-
dest: '{{ (cartridge_systemd_dir, systemd_unit.filename) | path_join }}'
25+
dest: '{{ (cartridge_systemd_dir, systemd_unit.filename) | cartridge_path_join }}'
2626
force: true
2727
loop_control:
2828
loop_var: systemd_unit

tasks/steps/blocks/unpack_tgz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
cartridge_app_install_dir,
4141
cartridge_app_instances_dir,
4242
instance_info.dist_dir,
43-
] | reject('equalto', none) }}"
43+
] | reject('none') | list }}"
4444
any_errors_fatal: true
4545

4646
- name: 'Configure tmpfiles'

tasks/steps/update_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22

3-
- when: delivered_package_path
3+
- when: delivered_package_path is not none
44
tags: cartridge-instances
55
block:
66
- name: 'BLOCK : Install package'

0 commit comments

Comments
 (0)