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

Ansible 2.6.1 'file' module error #332

prateekj201 opened this issue Jul 31, 2018 · 4 comments

Ansible 2.6.1 'file' module error #332

prateekj201 opened this issue Jul 31, 2018 · 4 comments


Copy link

@prateekj201 prateekj201 commented Jul 31, 2018

ansible version=2.6.1
Python 2.7.12
Virtualenv 15.0.1
Machine: Ubuntu 16.04.3 LTS

Task is as below:

- name: remove suid/sgid bit from binaries in blacklist
  file: path='{{item}}' mode='a-s' state=file follow=yes
  failed_when: false
    - '{{ os_security_suid_sgid_system_blacklist }}'
    - '{{ os_security_suid_sgid_blacklist }}'

Error as below:

Traceback (most recent call last):
  File "~/virtualenv/local/lib/python2.7/site-packages/ansible/executor/", line 104, in run
    item_results = self._run_loop(items)
  File "~/virtualenv/local/lib/python2.7/site-packages/ansible/executor/", line 334, in _run_loop
    res = self._execute(variables=task_vars)
  File "~/virtualenv/local/lib/python2.7/site-packages/ansible/executor/", line 576, in _execute
    result =
  File "~/ansible_code/mitogen-0.2.2/ansible_mitogen/", line 115, in run
    return super(ActionModuleMixin, self).run(tmp, task_vars)
  File "~/virtualenv/local/lib/python2.7/site-packages/ansible/plugins/action/", line 46, in run
    result = merge_hash(result, self._execute_module(task_vars=task_vars, wrap_async=wrap_async))
  File "~/ansible_code/mitogen-0.2.2/ansible_mitogen/", line 345, in _execute_module
  File "~/ansible_code/mitogen-0.2.2/ansible_mitogen/", line 479, in invoke
  File "~/ansible_code/mitogen-0.2.2/ansible_mitogen/", line 594, in call
    return self.call_async(func, *args, **kwargs).get().unpickle()
  File "~/ansible_code/mitogen-0.2.2/mitogen/", line 487, in unpickle
    raise obj
CallError: __main__.AnsibleModuleError: 
  File "<stdin>", line 2049, in _dispatch_calls
  File "<stdin>", line 2041, in _dispatch_one
  File "master:~/ansible_code/mitogen-0.2.2/ansible_mitogen/", line 272, in run_module
  File "master:~/ansible_code/mitogen-0.2.2/ansible_mitogen/", line 230, in run
    return self._run()
  File "master:~/ansible_code/mitogen-0.2.2/ansible_mitogen/", line 622, in _run
    exec('exec code in vars(mod)')
  File "<string>", line 1, in <module>
  File "master:~/virtualenv/local/lib/python2.7/site-packages/ansible/modules/files/", line 742, in <module>
  File "master:~/virtualenv/local/lib/python2.7/site-packages/ansible/modules/files/", line 726, in main
  File "master:~/virtualenv/local/lib/python2.7/site-packages/ansible/modules/files/", line 395, in ensure_file_attributes

fatal: [x.x.x.x]: FAILED! => {
    "msg": "Unexpected failure during module execution.", 
    "stdout": ""
Copy link

@prateekj201 prateekj201 commented Aug 1, 2018

Verified, this error is occurring since ansible 2.6.0 . Same code running fine in lower versions.

Copy link

@prateekj201 prateekj201 commented Aug 6, 2018

This seem to be happening mostly when the file actually does not exists and instead of skipping or ignoring it fails.

Copy link

@dw dw commented Aug 6, 2018

Hi there,

Per the documentation, Ansible 2.6.x is not yet supported. Please use 2.5.x for another week or so. Sorry for the hassle!

@dw dw added the target:v0.2 label Aug 11, 2018
dw added a commit that referenced this issue Aug 11, 2018
Copy link

@dw dw commented Aug 11, 2018

This will shortly be on the master branch (before end of weekend) and will make it into the next release. To be updated when a new release is made, subscribe to

Thanks for reporting this!

@dw dw closed this Aug 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants