# Unexpected behavior - bug or user error?

**URL:** <https://forum.ansible.com/t/unexpected-behavior-bug-or-user-error/17315>\
**Category:** Ansible Project\
**Created:** [January 19, 2015, 11:29pm UTC](https://forum.ansible.com/t/unexpected-behavior-bug-or-user-error/17315 "2015-01-19T23:29:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don\_Jackson1](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Don\_Jackson1](https://forum.ansible.com/u/Don_Jackson1)\
**Post date:** [January 19, 2015, 11:29pm UTC](https://forum.ansible.com/t/unexpected-behavior-bug-or-user-error/17315/1 "2015-01-19T23:29:56Z")

</div>

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
> 
> 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?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [January 19, 2015, 11:55pm UTC](https://forum.ansible.com/t/unexpected-behavior-bug-or-user-error/17315/2 "2015-01-19T23:55:12Z")

</div>

it assumes values are all strings, it is a bug.
