Skip to content

Commit

Permalink
Merge pull request #411 from vreniers/ansible_2_17_fix
Browse files Browse the repository at this point in the history
Compatibility with newer Ansible versions (tested 2.17.5)
  • Loading branch information
igorribeiroduarte authored Jan 9, 2025
2 parents d4ec9c1 + c96f602 commit b564efd
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 39 deletions.
19 changes: 16 additions & 3 deletions ansible-scylla-manager/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ galaxy_info:
- scylla
- scylla-manager

dependencies:
- ansible-scylla-node

dependencies:
- role: "ansible-scylla-node"
vars:
scylla_version: 'latest'
install_only: true
scylla_manager_enabled: false
scylla_edition: "{{ scylla_manager_db_vars.scylla_edition|default('oss') }}"
elrepo_kernel: false
scylla_repo_keyserver: "{{ scylla_manager_db_vars.scylla_repo_keyserver|default('') }}"
scylla_repo_keys: "{{ scylla_manager_db_vars.scylla_repo_keys|default([]) }}"
scylla_dependencies: "{{ scylla_manager_db_vars.scylla_dependencies|default([]) }}"
scylla_ssl:
internode:
enabled: false
client:
enabled: false
20 changes: 0 additions & 20 deletions ansible-scylla-manager/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,4 @@
---
- name: deploy local Scylla on the Manager node
import_role:
name: "{{ role_path }}/../ansible-scylla-node"
vars:
# TODO how to use scylla_manager_db_vars to be passed on as role params?
install_only: True
scylla_manager_enabled: false
scylla_version: 'latest'
scylla_edition: "{{ scylla_manager_db_vars.scylla_edition|default('oss') }}"
elrepo_kernel: false
scylla_repo_keyserver: "{{ scylla_manager_db_vars.scylla_repo_keyserver|default('') }}"
scylla_repo_keys: "{{ scylla_manager_db_vars.scylla_repo_keys|default([]) }}"
scylla_dependencies: "{{ scylla_manager_db_vars.scylla_dependencies|default([]) }}"
scylla_ssl:
internode:
enabled: false
client:
enabled: false


- name: install Scylla Manager
include_tasks: "{{ ansible_os_family }}.yml"

Expand Down
2 changes: 1 addition & 1 deletion ansible-scylla-node/tasks/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- firewalld.service
- iptables_services.service
- ufw.service
when: ansible_facts.services[item] is defined
when: ansible_facts.services[item] is defined and ansible_facts.services[item]['status'] != 'not-found'
- name: Flush all iptables rules
iptables:
flush: yes
Expand Down
6 changes: 1 addition & 5 deletions ansible-scylla-node/tasks/manager_agents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,4 @@
state: restarted
enabled: yes
become: true
when: manager_agent_config_change.changed and start_scylla_service is defined and start_scylla_service|bool
ignore_errors: true
#TODO: remove ignore_errors when ansible is bumped to 2.10.4 or 2.9.16 as per https://github.com/ansible/ansible/issues/71528


when: manager_agent_config_change.changed and start_scylla_service is defined and start_scylla_service|bool
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 ScyllaDB
Expand Down
2 changes: 1 addition & 1 deletion example-playbooks/async_extra/action_plugins/async_kill.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 ScyllaDB
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 ScyllaDB
Expand Down
8 changes: 4 additions & 4 deletions example-playbooks/async_extra/action_plugins/async_task.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 ScyllaDB
Expand Down Expand Up @@ -374,9 +374,9 @@ def wait_async_task(self, alias, cleanup, retries, delay, vars):
def v2_on_result(self, host, task, result):
handler = self._shared_loader_obj.callback_loader.get('default')
handler._display = self._display
handler.display_ok_hosts = True
handler.display_failed_stderr = True
handler.display_skipped_hosts = True
handler.set_option('display_ok_hosts', True)
handler.set_option('display_failed_stderr', True)
handler.set_option('display_skipped_hosts', True)

payload = TaskResult(host=host, task=task, return_data=result, task_fields=self._task.dump_attrs())

Expand Down
2 changes: 1 addition & 1 deletion example-playbooks/async_extra/action_plugins/async_wait.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 ScyllaDB
Expand Down
2 changes: 1 addition & 1 deletion example-playbooks/async_extra/library/async_kill.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 ScyllaDB
Expand Down
2 changes: 1 addition & 1 deletion example-playbooks/async_extra/library/async_status_id.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 ScyllaDB
Expand Down

0 comments on commit b564efd

Please sign in to comment.