diff --git a/roles/debian/ansible/defaults/main.yml b/roles/debian/ansible/defaults/main.yml index 2be4f5a9c..47707d7d0 100644 --- a/roles/debian/ansible/defaults/main.yml +++ b/roles/debian/ansible/defaults/main.yml @@ -1,13 +1,13 @@ --- -ce_ansible_version: "<12.0" ce_ansible: # These are usually set in the _init role using _venv_path, _venv_command and _venv_install_username but can be overridden. #venv_path: "/home/{{ ce_provision.username }}/ansible" #venv_command: /usr/bin/python3.11 -m venv #venv_install_username: ansible # user to become when creating venv + ansible_version: "<12.0" # also check install.sh script in the repo root and set the version there accordingly. upgrade: - enabled: true # create systemd timer to auto-upgrade Ansible - command: "{{ _venv_path }}/bin/python3 -m pip install --upgrade ansible{{ ce_ansible_version }}" # if you set venv_path above then set it here too. + enabled: false # create systemd timer to auto-upgrade Ansible. Temporary disabled due to ansible 2.19 breaking changes. + command: "{{ _venv_path }}/bin/python3 -m pip install --upgrade ansible" # if you set venv_path above then set it here too on_calendar: "*-*-* 01:30:00" # see systemd.time documentation - https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Calendar%20Events #timer_name: upgrade_ansible linters: diff --git a/roles/debian/ansible/tasks/main.yml b/roles/debian/ansible/tasks/main.yml index c0cf40389..cdf6d0862 100644 --- a/roles/debian/ansible/tasks/main.yml +++ b/roles/debian/ansible/tasks/main.yml @@ -60,7 +60,7 @@ packages: - name: pip state: latest - - name: "ansible{{ ce_ansible_version }}" + - name: "ansible{{ ce_ansible.ansible_version }}" - name: python-debian - name: Install linters. @@ -86,7 +86,8 @@ block: - name: Build systemd timer variables string. ansible.builtin.set_fact: - _timer: "{'{{ ce_ansible.upgrade.timer_name | default(_ce_ansible_timer_name) }}': { timer_command: '{{ ce_ansible.upgrade.command | quote }}'', timer_OnCalendar: '{{ ce_ansible.upgrade.on_calendar }}' }}" + _timer: "{'{{ ce_ansible.upgrade.timer_name | default(_ce_ansible_timer_name) }}': { timer_command: '{{ ce_ansible.upgrade.command }}', timer_OnCalendar: '{{ ce_ansible.upgrade.on_calendar }}' }}" + - name: Turn the timer string into a dictionary. ansible.builtin.set_fact: _timer: "{{ _timer.splitlines() | map('from_yaml') | list }}"