diff --git a/roles/ansible_node/defaults/main.yml b/roles/ansible_node/defaults/main.yml index f5514d5..e0f2529 100644 --- a/roles/ansible_node/defaults/main.yml +++ b/roles/ansible_node/defaults/main.yml @@ -54,7 +54,7 @@ ansible_node_disallowed_packages: # Problems with 11.1: # fatal: [127.0.0.1]: FAILED! => {"changed": false, "module_stderr": "/bin/sh: line 1: /root/.venvs/ansible/bin/python3.11: Permission denied\n", "module_stdout": "", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 126} -ansible_node_ansible_version: 10.7 +ansible_node_ansible_version: 11.1 # required switching from 2.9 to newer version ansible_node_remove_before_install: false diff --git a/roles/ansible_node/tasks/instance.yml b/roles/ansible_node/tasks/instance.yml index 7a57bba..731c43a 100644 --- a/roles/ansible_node/tasks/instance.yml +++ b/roles/ansible_node/tasks/instance.yml @@ -5,6 +5,10 @@ available_playbook: "{{ r_playbook.value }}" available_playbook_name: "{{ r_playbook.key }}" +- name: Set playbook_ansible_python_interpreter - {{ available_playbook_name }} + ansible.builtin.set_fact: + playbook_ansible_python_interpreter: '{{ ansible_python_interpreter if ansible_python_interpreter is defined else ansible_node_playbook_ansible_python_interpreter }}' + - name: Set playbook_filename - {{ available_playbook_name }} ansible.builtin.set_fact: playbook_filename: '{{ ansible_node_playbook_dir }}/{{ available_playbook.playbook }}' diff --git a/roles/ansible_node/templates/playbooks/backup.yml.j2 b/roles/ansible_node/templates/playbooks/backup.yml.j2 index 92c69a0..073f6e2 100644 --- a/roles/ansible_node/templates/playbooks/backup.yml.j2 +++ b/roles/ansible_node/templates/playbooks/backup.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} {% if backup_max_days is defined %} backup_max_days: {{ backup_max_days }} diff --git a/roles/ansible_node/templates/playbooks/drupal_cron.yml.j2 b/roles/ansible_node/templates/playbooks/drupal_cron.yml.j2 index d2ac7d0..5eff15d 100644 --- a/roles/ansible_node/templates/playbooks/drupal_cron.yml.j2 +++ b/roles/ansible_node/templates/playbooks/drupal_cron.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} drupal_task_name: cron drush_path: {{ drush_path }} diff --git a/roles/ansible_node/templates/playbooks/drupal_scheduler.yml.j2 b/roles/ansible_node/templates/playbooks/drupal_scheduler.yml.j2 index a04c83f..09df79c 100644 --- a/roles/ansible_node/templates/playbooks/drupal_scheduler.yml.j2 +++ b/roles/ansible_node/templates/playbooks/drupal_scheduler.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} drupal_task_name: scheduler drush_path: {{ drush_path }} diff --git a/roles/ansible_node/templates/playbooks/git_mirror.yml.j2 b/roles/ansible_node/templates/playbooks/git_mirror.yml.j2 index 68426f8..5f8df0f 100644 --- a/roles/ansible_node/templates/playbooks/git_mirror.yml.j2 +++ b/roles/ansible_node/templates/playbooks/git_mirror.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} git_mirrors: {{ git_mirrors | to_nice_yaml(indent=2) | trim | indent(6) }} diff --git a/roles/ansible_node/templates/playbooks/goaccess.yml.j2 b/roles/ansible_node/templates/playbooks/goaccess.yml.j2 index 4f32a70..8de2e31 100644 --- a/roles/ansible_node/templates/playbooks/goaccess.yml.j2 +++ b/roles/ansible_node/templates/playbooks/goaccess.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} system_task_name: goaccess {% if system_task_goaccess_index_file is defined %} diff --git a/roles/ansible_node/templates/playbooks/matomo_config_sync.yml.j2 b/roles/ansible_node/templates/playbooks/matomo_config_sync.yml.j2 index 251a9aa..6e098c3 100644 --- a/roles/ansible_node/templates/playbooks/matomo_config_sync.yml.j2 +++ b/roles/ansible_node/templates/playbooks/matomo_config_sync.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} {% if matomo_config_master is defined %} matomo_config_master: {{ matomo_config_master }} diff --git a/roles/ansible_node/templates/playbooks/matomo_cron.yml.j2 b/roles/ansible_node/templates/playbooks/matomo_cron.yml.j2 index 16ae2c7..ec62758 100644 --- a/roles/ansible_node/templates/playbooks/matomo_cron.yml.j2 +++ b/roles/ansible_node/templates/playbooks/matomo_cron.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} {% if matomo_task_become is defined %} matomo_task_become: {{ matomo_task_become | bool | lower }} diff --git a/roles/ansible_node/templates/playbooks/matomo_geoip.yml.j2 b/roles/ansible_node/templates/playbooks/matomo_geoip.yml.j2 index 9ef6489..818c53b 100644 --- a/roles/ansible_node/templates/playbooks/matomo_geoip.yml.j2 +++ b/roles/ansible_node/templates/playbooks/matomo_geoip.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} {% if matomo_task_become is defined %} matomo_task_become: {{ matomo_task_become | bool | lower }} diff --git a/roles/ansible_node/templates/playbooks/matomo_queuedtracking.yml.j2 b/roles/ansible_node/templates/playbooks/matomo_queuedtracking.yml.j2 index c34b7e4..f466aa1 100644 --- a/roles/ansible_node/templates/playbooks/matomo_queuedtracking.yml.j2 +++ b/roles/ansible_node/templates/playbooks/matomo_queuedtracking.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} {% if matomo_task_become is defined %} matomo_task_become: {{ matomo_task_become | bool | lower }} diff --git a/roles/ansible_node/templates/playbooks/nextcloud_cron.yml.j2 b/roles/ansible_node/templates/playbooks/nextcloud_cron.yml.j2 index 2f91b06..81e046f 100644 --- a/roles/ansible_node/templates/playbooks/nextcloud_cron.yml.j2 +++ b/roles/ansible_node/templates/playbooks/nextcloud_cron.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} nextcloud_task_name: 'cron' diff --git a/roles/ansible_node/templates/playbooks/postgres_pgbadger.yml.j2 b/roles/ansible_node/templates/playbooks/postgres_pgbadger.yml.j2 index 01154b5..9b6347f 100644 --- a/roles/ansible_node/templates/playbooks/postgres_pgbadger.yml.j2 +++ b/roles/ansible_node/templates/playbooks/postgres_pgbadger.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} system_task_name: pgbadger_query {% if postgresql_version is defined %} diff --git a/roles/ansible_node/templates/playbooks/postgres_vacuum.yml.j2 b/roles/ansible_node/templates/playbooks/postgres_vacuum.yml.j2 index b288ffa..e41c8e0 100644 --- a/roles/ansible_node/templates/playbooks/postgres_vacuum.yml.j2 +++ b/roles/ansible_node/templates/playbooks/postgres_vacuum.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} system_task_name: postgres_vacuum system_task_postgres_quiet: {{ system_task_postgres_quiet | bool | lower if system_task_postgres_quiet is defined else true }} diff --git a/roles/ansible_node/templates/playbooks/project_sync.yml.j2 b/roles/ansible_node/templates/playbooks/project_sync.yml.j2 index f55cea1..5d3d6e5 100644 --- a/roles/ansible_node/templates/playbooks/project_sync.yml.j2 +++ b/roles/ansible_node/templates/playbooks/project_sync.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} {% if project_sync_instance_name is defined %} project_sync_instance_name: {{ project_sync_instance_name }} diff --git a/roles/ansible_node/templates/playbooks/puma_restart.yml.j2 b/roles/ansible_node/templates/playbooks/puma_restart.yml.j2 index a46f590..730b2ef 100644 --- a/roles/ansible_node/templates/playbooks/puma_restart.yml.j2 +++ b/roles/ansible_node/templates/playbooks/puma_restart.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} system_task_name: service_restart system_task_service_name: {{ puma_restart_service_name | default('puma-redmine') }} diff --git a/roles/ansible_node/templates/playbooks/redmine_automation.yml.j2 b/roles/ansible_node/templates/playbooks/redmine_automation.yml.j2 index 05ef40b..db4cfa1 100644 --- a/roles/ansible_node/templates/playbooks/redmine_automation.yml.j2 +++ b/roles/ansible_node/templates/playbooks/redmine_automation.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} redmine_task_name: automation {% if rails_env is defined and rails_env != 'production' %} diff --git a/roles/ansible_node/templates/playbooks/redmine_helpdesk_mailer.yml.j2 b/roles/ansible_node/templates/playbooks/redmine_helpdesk_mailer.yml.j2 index 0b6c0d4..50fbb53 100644 --- a/roles/ansible_node/templates/playbooks/redmine_helpdesk_mailer.yml.j2 +++ b/roles/ansible_node/templates/playbooks/redmine_helpdesk_mailer.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} redmine_task_name: helpdesk {% if rails_env is defined and rails_env != 'production' %} diff --git a/roles/ansible_node/templates/playbooks/redmine_maintenance.yml.j2 b/roles/ansible_node/templates/playbooks/redmine_maintenance.yml.j2 index 418cc26..549c370 100644 --- a/roles/ansible_node/templates/playbooks/redmine_maintenance.yml.j2 +++ b/roles/ansible_node/templates/playbooks/redmine_maintenance.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} redmine_task_name: maintenance {% if rails_env is defined and rails_env != 'production' %} diff --git a/roles/ansible_node/templates/playbooks/redmine_receive_mails.yml.j2 b/roles/ansible_node/templates/playbooks/redmine_receive_mails.yml.j2 index 35c3008..3fbce01 100644 --- a/roles/ansible_node/templates/playbooks/redmine_receive_mails.yml.j2 +++ b/roles/ansible_node/templates/playbooks/redmine_receive_mails.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} redmine_task_name: receive {% if rails_env is defined and rails_env != 'production' %} diff --git a/roles/ansible_node/templates/playbooks/redmine_reminder.yml.j2 b/roles/ansible_node/templates/playbooks/redmine_reminder.yml.j2 index f1b8819..021a4de 100644 --- a/roles/ansible_node/templates/playbooks/redmine_reminder.yml.j2 +++ b/roles/ansible_node/templates/playbooks/redmine_reminder.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} redmine_task_name: reminder {% if rails_env is defined and rails_env != 'production' %} diff --git a/roles/ansible_node/templates/playbooks/system_watch.yml.j2 b/roles/ansible_node/templates/playbooks/system_watch.yml.j2 index a276748..973d3f7 100644 --- a/roles/ansible_node/templates/playbooks/system_watch.yml.j2 +++ b/roles/ansible_node/templates/playbooks/system_watch.yml.j2 @@ -5,8 +5,8 @@ serial: 1 vars: -{% if ansible_node_playbook_ansible_python_interpreter != '' %} - ansible_python_interpreter: {{ ansible_node_playbook_ansible_python_interpreter }} +{% if playbook_ansible_python_interpreter != '' %} + ansible_python_interpreter: {{ playbook_ansible_python_interpreter }} {% endif %} system_watch_repo: {{ system_watch_repo }} {% if https_user is defined and https_user != '' %}