ansible 2.6.20
config file = /home/mark/ansible.cfg
configured module search path = [u'/home/mark/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/mark/ansible-2.6/lib/python2.7/site-packages/ansible
executable location = /home/mark/ansible-2.6/bin/ansible
python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /home/mark/ansible.cfg as config file
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Loading callback plugin minimal of type stdout, v2.0 from /home/mark/ansible-2.6/lib/python2.7/site-packages/ansible/plugins/callback/minimal.pyc
ERROR! Unexpected Exception, this is probably a bug: invalid syntax (fake_filesystem.py, line 1195)
the full traceback was:
Traceback (most recent call last):
File "/home/mark/ansible-2.6/bin/ansible", line 118, in <module>
exit_code = cli.run()
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ansible/cli/adhoc.py", line 181, in run
result = self._tqm.run(play)
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 231, in run
self.load_callbacks()
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 193, in load_callbacks
for callback_plugin in callback_loader.all(class_only=True):
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ansible/plugins/loader.py", line 489, in all
module = self._load_module_source(name, path)
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ansible/plugins/loader.py", line 357, in _load_module_source
module = imp.load_source(full_name, path, module_file)
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ara/plugins/callbacks/log_ara.py", line 29, in <module>
from ara.webapp import create_app
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ara/webapp.py", line 39, in <module>
from ara.utils import fast_count
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/ara/utils.py", line 24, in <module>
import pyfakefs.fake_filesystem as fake_filesystem
File "/home/mark/ansible-2.6/lib/python2.7/site-packages/pyfakefs/fake_filesystem.py", line 1195
def utime(self, path, times=None, *, ns=None, follow_symlinks=True): ^
SyntaxError: invalid syntax
pyfakefs 4.0.0 and 4.0.1 were released yesterday, apparently without python2 support. Looks like we need to pin.
pip install 'pyfakefs<4'
Now it works.
FWIW, without the ARA callback plugin config this works.
The command that is executed during that task is:
ansible all -i {{ kolla_inventory _path }} -e ansible_user={{ ansible_user }} -m setup > /tmp/logs/ ansible/ initial- setup
Essentially, gathering facts.
Reproducing on a CentOS 7 box:
sudo yum -y install python-virtualenv gcc libffi-devel openssl-devel 2.6/bin/ activate ansible- 2.6/lib/ python2. 7/site- packages/ ara/plugins/ callbacks 2.6/bin/ ansible localhost -m setup -e ansible_ python_ interpreter= $(which python) -vvvv
virtualenv ansible-2.6
source ansible-
pip install 'ansible<2.7' 'ara<1.0.0'
cat << EOF > ansible.cfg
[defaults]
callback_plugins = $(pwd)/
EOF
./ansible-
This fails:
ansible 2.6.20 ansible. cfg mark/.ansible/ plugins/ modules' , u'/usr/ share/ansible/ plugins/ modules' ] ansible- 2.6/lib/ python2. 7/site- packages/ ansible ansible- 2.6/bin/ ansible ansible. cfg as config file
config file = /home/mark/
configured module search path = [u'/home/
ansible python module location = /home/mark/
executable location = /home/mark/
python version = 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
Using /home/mark/
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
Loading callback plugin minimal of type stdout, v2.0 from /home/mark/ ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ plugins/ callback/ minimal. pyc m.py, line 1195)
ERROR! Unexpected Exception, this is probably a bug: invalid syntax (fake_filesyste
the full traceback was:
Traceback (most recent call last): mark/ansible- 2.6/bin/ ansible" , line 118, in <module> mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ cli/adhoc. py", line 181, in run mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ executor/ task_queue_ manager. py", line 231, in run load_callbacks( ) mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ executor/ task_queue_ manager. py", line 193, in load_callbacks loader. all(class_ only=True) : mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ plugins/ loader. py", line 489, in all module_ source( name, path) mark/ansible- 2.6/lib/ python2. 7/site- packages/ ansible/ plugins/ loader. py", line 357, in _load_module_source source( full_name, path, module_file) mark/ansible- 2.6/lib/ python2. 7/site- packages/ ara/plugins/ callbacks/ log_ara. py", line 29, in <module> mark/ansible- 2.6/lib/ python2. 7/site- packages/ ara/webapp. py", line 39, in <module> mark/ansible- 2.6/lib/ python2. 7/site- packages/ ara/utils. py", line 24, in <module> fake_filesystem as fake_filesystem mark/ansible- 2.6/lib/ python2. 7/site- packages/ pyfakefs/ fake_filesystem .py", line 1195 symlinks= True):
^
File "/home/
exit_code = cli.run()
File "/home/
result = self._tqm.run(play)
File "/home/
self.
File "/home/
for callback_plugin in callback_
File "/home/
module = self._load_
File "/home/
module = imp.load_
File "/home/
from ara.webapp import create_app
File "/home/
from ara.utils import fast_count
File "/home/
import pyfakefs.
File "/home/
def utime(self, path, times=None, *, ns=None, follow_
SyntaxError: invalid syntax
pyfakefs 4.0.0 and 4.0.1 were released yesterday, apparently without python2 support. Looks like we need to pin.
pip install 'pyfakefs<4'
Now it works.
FWIW, without the ARA callback plugin config this works.