Updated setting of limits to use module
diff --git a/defaults/main.yml b/defaults/main.yml
index 1152dab..2ac7c16 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -1,2 +1,7 @@
---
# defaults file for apigee-opdk-setup-os-ds
+apigee_limits:
+- { domain: '*', limit_type: '-', limit_item: 'memlock', value: 'unlimited' }
+- { domain: '*', limit_type: '-', limit_item: 'nofile', value: '100000' }
+- { domain: '*', limit_type: '-', limit_item: 'nproc', value: '32768' }
+- { domain: '*', limit_type: '-', limit_item: 'as', value: 'unlimited' }
diff --git a/tasks/main.yml b/tasks/main.yml
index 75b64ce..dedf71a 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,10 +1,19 @@
---
# tasks file for apigee-opdk-setup-os-limits
+#- name: Update limits.conf
+# become: yes
+# copy:
+# src: apigee.limits.conf
+# dest: /etc/security/limits.d/apigee.limits.conf
+# owner: root
+# group: root
+# mode: 0644
+
- name: Update limits.conf
become: yes
- copy:
- src: apigee.limits.conf
- dest: /etc/security/limits.d/apigee.limits.conf
- owner: root
- group: root
- mode: 0644
+ pam_limits:
+ domain: "{{ item.domain }}"
+ limit_type: "{{ item.limit_type }}"
+ limit_item: "{{ item.limit_item }}"
+ value: "{{ item.value }}"
+ with_items: "{{ apigee_limits }}"
\ No newline at end of file