While attempting to use the sysctl module like this:

      sysctl:
        name: vm.swappiness
        value: 0
        state: present
        reload: true

I got the following error:

TASK: [Ensure vm.swappiness is set to 0] 
**************************************
failed: [mgmt] => {"failed": true, "parsed": false}
SUDO-SUCCESS-urhsorhzrlftxcytlkatmfbrbjzbfqcj
Traceback (most recent call last):
  File 
"/home/ds/.ansible/tmp/ansible-tmp-1421708908.33-97939341875354/sysctl", 
line 1899, in <module>
    main()
  File 
"/home/ds/.ansible/tmp/ansible-tmp-1421708908.33-97939341875354/sysctl", 
line 327, in main
    result = SysctlModule(module)
  File 
"/home/ds/.ansible/tmp/ansible-tmp-1421708908.33-97939341875354/sysctl", 
line 118, in __init__
    self.process()
  File 
"/home/ds/.ansible/tmp/ansible-tmp-1421708908.33-97939341875354/sysctl", 
line 128, in process
    self.args['value'] = self._parse_value(self.args['value'])
  File 
"/home/ds/.ansible/tmp/ansible-tmp-1421708908.33-97939341875354/sysctl", 
line 188, in _parse_value
    elif value.lower() in BOOLEANS_TRUE:
AttributeError: 'int' object has no attribute 'lower'


If I quote the value, e.g. '0', it then works.

Is this the expected behavior, or is this a bug?


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a542e3c7-2fc8-4a5e-9edd-162ec20fcd26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to