mockey
August 8, 2021, 2:22am
1
Using ansible 4.3.0 (core: 2.11.3) results in deploy errors:
'PlayContext' object has no attribute '_ssh_args'
and:
The conditional check 'not ansible_ssh_extra_args' failed. The error was:
error while evaluating conditional (not ansible_ssh_extra_args):
'ansible_ssh_extra_args' is undefined
Apparently the attribute _ssh_args
was removed from PlayContext
in 2.11:
# -*- coding: utf-8 -*-
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# Make coding more python3-ish
This file has been truncated. show original
Trellis is currently tested only up to ansible
version 2.9.10
, it should actually log a warning during playbook run:
from operator import eq, ge, gt
from sys import version_info
try:
from __main__ import display
except ImportError:
from ansible.utils.display import Display
display = Display()
version_requirement = '2.8.0'
version_tested_max = '2.9.10'
python3_required_version = '2.5.3'
if version_info[0] == 3 and not ge(LooseVersion(__version__), LooseVersion(python3_required_version)):
raise AnsibleError(('Ansible >= {} is required when using Python 3.\n'
'Either downgrade to Python 2 or update your Ansible version to {}.').format(python3_required_version, python3_required_version))
if not ge(LooseVersion(__version__), LooseVersion(version_requirement)):
raise AnsibleError(('Trellis no longer supports Ansible {}.\n'
'Please upgrade to Ansible {} or higher.').format(__version__, version_requirement))
elif gt(LooseVersion(__version__), LooseVersion(version_tested_max)):
elif gt(LooseVersion(__version__), LooseVersion(version_tested_max)):
display.warning(u'Your Ansible version is {} but this version of Trellis has only been tested for '
u'compatability with Ansible {} -> {}. It is advisable to check for Trellis updates or '
u'downgrade your Ansible version.'.format(__version__, version_requirement, version_tested_max))
You are using ansible
version 2.11.3
which is of course higher than the one tested to be working of 2.9.10
.
Note: You can also install ansible
by pip
to ensure a specific version is used.
mockey
August 10, 2021, 3:53am
3
Yes, I know that 2.11 is not supported. I just thought I mention it here.
I went back to 2.10, that still works.
1 Like
This issue may be intereasting:
opened 12:47AM - 09 Jun 21 UTC
I've read the guidelines for Contributing to Roots Projects
This request isn't a duplicate of an existing request
This is not...
system
Closed
September 19, 2021, 2:25am
5
This topic was automatically closed after 42 days. New replies are no longer allowed.