# Declare variable user created with limits

**URL:** <https://forum.ansible.com/t/declare-variable-user-created-with-limits/29185>\
**Category:** Ansible Project\
**Created:** [December 4, 2018, 4:24am UTC](https://forum.ansible.com/t/declare-variable-user-created-with-limits/29185 "2018-12-04T04:24:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcoussi](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mcoussi/32/8056_2.png) [@mcoussi](https://forum.ansible.com/u/mcoussi)\
**Post date:** [December 4, 2018, 4:24am UTC](https://forum.ansible.com/t/declare-variable-user-created-with-limits/29185/1 "2018-12-04T04:24:22Z")

</div>

Hi,

I have a variable with this structure where i declare the users that i have to create.

`  
struct :  
users:

- { name: user1, uid: 2001, shell: /bin/sh, group: grp1, groups: grp2, home: /home/user1 }
- { name: user2, uid: 2002, shell: /bin/sh, group: grp1, groups: grp2, home: /home/user2 }
- { name: user3, uid: 2002, shell: /bin/sh, group: grp1, groups: grp2, home: /home/user3 }  
`

For each user, i want to define the limits but i don’t know how to declare this in the structure of my variable “struct”.

`

- { type: soft, item: nofile, value: 65536}
- { type: hard, item: nofile, value: 65536}
- { type: soft, item: nproc, value: 16000}
- { type: hard, item: nproc, value: 16000}  
`

Thanks for your help,

Matt

---

<div class="post-metadata">

**Author:** ![powcarz](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@powcarz](https://forum.ansible.com/u/powcarz)\
**Post date:** [December 4, 2018, 9:31am UTC](https://forum.ansible.com/t/declare-variable-user-created-with-limits/29185/2 "2018-12-04T09:31:24Z")

</div>

Piotr

---

<div class="post-metadata">

**Author:** ![mcoussi](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mcoussi/32/8056_2.png) [@mcoussi](https://forum.ansible.com/u/mcoussi)\
**Post date:** [December 5, 2018, 2:29pm UTC](https://forum.ansible.com/t/declare-variable-user-created-with-limits/29185/3 "2018-12-05T14:29:06Z")

</div>

Hi,

Thx for you reply.  
I’m gonna to test.

Matt
