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

incompatibility with ansible v2.2: NameError: global name 'BOOLEANS' is not defined #4

Open
juju4 opened this issue Nov 10, 2016 · 0 comments

Comments

@juju4
Copy link

juju4 commented Nov 10, 2016

$ ansible -i inventory dltest -m apt -a "name=wget state=present" -vvvv
Loading callback plugin minimal of type stdout, v2.0 from /usr/local/lib/python2.7/dist-packages/ansible/plugins/callback/__init__.pyc
Using module file /usr/local/lib/python2.7/dist-packages/ansible/modules/core/packaging/os/apt.py
XXX exec_command: /bin/sh -c '( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1478807384.4-192196860889135 `" && echo ansible-tmp-1478807384.4-192196860889135="` echo $HOME/.ansible/tmp/ansible-tmp-1478807384.4-192196860889135 `" ) && sleep 0'
XXX connect
[DEPRECATION WARNING]: ansible.utils.unicode.to_bytes is deprecated.  Use ansible.module_utils._text.to_bytes instead.
This feature will be removed in version 2.4. 
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: ansible.utils.unicode.to_unicode is deprecated.  Use ansible.module_utils._text.to_text instead.
This feature will be removed in version 2.4. 
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
<x.y.z.109> SSH: EXEC ssh -C -vvv -o ForwardAgent=yes -o 'IdentityFile="/home/user/.ssh/keys/key-201511"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=root -o ConnectTimeout=10 -tt x.y.z.109 'lxc exec dltest -- /bin/sh -c '"'"'/bin/sh -c '"'"'"'"'"'"'"'"'( umask 77 && mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1478807384.4-192196860889135 `" && echo ansible-tmp-1478807384.4-192196860889135="` echo $HOME/.ansible/tmp/ansible-tmp-1478807384.4-192196860889135 `" ) && sleep 0'"'"'"'"'"'"'"'"''"'"''
XXX connect
<x.y.z.109> PUT /tmp/tmpy2jk8V TO /root/.ansible/tmp/ansible-tmp-1478807384.4-192196860889135/apt.py
XXX close
An exception occurred during task execution. The full traceback is:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 119, in run
    res = self._execute()
  File "/usr/local/lib/python2.7/dist-packages/ansible/executor/task_executor.py", line 490, in _execute
    result = self._handler.run(task_vars=variables)
  File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/action/normal.py", line 33, in run
    results = merge_hash(results, self._execute_module(tmp=tmp, task_vars=task_vars))
  File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 593, in _execute_module
    self._transfer_data(remote_module_path, module_data)
  File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 299, in _transfer_data
    self._transfer_file(afile, remote_path)
  File "/usr/local/lib/python2.7/dist-packages/ansible/plugins/action/__init__.py", line 276, in _transfer_file
    self._connection.put_file(local_path, remote_path)
  File "/opt/tmp/vagrant/homelab/ansible-lxc-ssh/lxc_ssh.py", line 564, in put_file
    if scp_if_ssh in BOOLEANS:
NameError: global name 'BOOLEANS' is not defined

dltest | FAILED! => {
    "failed": true, 
    "msg": "Unexpected failure during module execution.", 
    "stdout": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant