Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with newer Ansible versions (tested 2.17.5) #411

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one of the changes that may break things with older Ansible

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only such change AFAICT


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
vladzcloudius marked this conversation as resolved.
Show resolved Hide resolved
# -*- 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