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

Closed
prateekj201 opened this Issue Jul 31, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@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
Mitogen=mitogen-0.2.2

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
  with_items:
    - '{{ 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/task_executor.py", line 104, in run
    item_results = self._run_loop(items)
  File "~/virtualenv/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 334, in _run_loop
    res = self._execute(variables=task_vars)
  File "~/virtualenv/local/lib/python2.7/site-packages/ansible/executor/task_executor.py", line 576, in _execute
    result = self._handler.run(task_vars=variables)
  File "~/ansible_code/mitogen-0.2.2/ansible_mitogen/mixins.py", line 115, in run
    return super(ActionModuleMixin, self).run(tmp, task_vars)
  File "~/virtualenv/local/lib/python2.7/site-packages/ansible/plugins/action/normal.py", 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/mixins.py", line 345, in _execute_module
    timeout_secs=self.get_task_timeout_secs(),
  File "~/ansible_code/mitogen-0.2.2/ansible_mitogen/planner.py", line 479, in invoke
    kwargs=planner.get_kwargs(),
  File "~/ansible_code/mitogen-0.2.2/ansible_mitogen/connection.py", line 594, in call
    return self.call_async(func, *args, **kwargs).get().unpickle()
  File "~/ansible_code/mitogen-0.2.2/mitogen/core.py", 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/target.py", line 272, in run_module
    return impl.run()
  File "master:~/ansible_code/mitogen-0.2.2/ansible_mitogen/runner.py", line 230, in run
    return self._run()
  File "master:~/ansible_code/mitogen-0.2.2/ansible_mitogen/runner.py", 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/file.py", line 742, in <module>
  File "master:~/virtualenv/local/lib/python2.7/site-packages/ansible/modules/files/file.py", line 726, in main
  File "master:~/virtualenv/local/lib/python2.7/site-packages/ansible/modules/files/file.py", line 395, in ensure_file_attributes


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

This comment has been minimized.

prateekj201 commented Aug 1, 2018

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

@prateekj201

This comment has been minimized.

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.

@dw

This comment has been minimized.

Owner

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

@dw

This comment has been minimized.

Owner

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 https://www.freelists.org/list/mitogen-announce

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