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.4 EL6 module error #6

Open
bigHosting opened this issue Dec 14, 2017 · 3 comments
Open

Ansible 2.4 EL6 module error #6

bigHosting opened this issue Dec 14, 2017 · 3 comments

Comments

@bigHosting
Copy link

II just tried this on Ansible 2.4 & EL6 and I got errors :(

  • hosts: all
    gather_facts: yes
    serial: "25%"
    sudo: yes
    tasks:
    • name: set timeout to 22
      grub: timeout=22

Error:

TASK [set timeout to 22] ********************************************************************************************************************************************
fatal: [mal0c0]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Shared connection to mal0c0 closed.\r\n", "module_stdout": "\r\nTraceback (most recent call last):\r\n File "/tmp/ansible_7xlrIz/ansible_module_grub.py", line 454, in \r\n main()\r\n File "/tmp/ansible_7xlrIz/ansible_module_grub.py", line 441, in main\r\n (rc, changed, msg) = grub.set_timeout()\r\n File "/tmp/ansible_7xlrIz/ansible_module_grub.py", line 392, in set_timeout\r\n return self._grub_set_timeout()\r\n File "/tmp/ansible_7xlrIz/ansible_module_grub.py", line 361, in _grub_set_timeout\r\n if self._grub_save_config(contents) is not True:\r\nNameError: global name 'contents' is not defined\r\n", "msg": "MODULE FAILURE", "rc": 0}

bushvin added a commit that referenced this issue Dec 14, 2017
@bushvin
Copy link
Owner

bushvin commented Dec 14, 2017

Thank you for spotting this error. I believe it should be fixed now.

@bigHosting
Copy link
Author

Thank you, now definitely is better as there is no error. functionality wise the line gets substituded with 'R' so instead of timeout=22 I see 'R' on a single line where timeout=5 used to be .

@bushvin
Copy link
Owner

bushvin commented Dec 14, 2017

I found the problem, and fixed it.
I also did a major overhaul of the codebase.
It now supports --diff as well.

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

2 participants