Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

module cannot remove certain limits pam_limits.py #1083

Closed
kerrc opened this issue Oct 12, 2015 · 8 comments
Closed

module cannot remove certain limits pam_limits.py #1083

kerrc opened this issue Oct 12, 2015 · 8 comments

Comments

@kerrc
Copy link

kerrc commented Oct 12, 2015

ISSUE TYPE

Feature Idea

COMPONENT NAME

pam_limits module

ANSIBLE VERSION

N/A

SUMMARY

Is it possible to get an ensure: absent component added to this module.

Here I have an example where I want to add limits underneath limits.d as my default but do not want the limit present in limits.conf.

Ideally I want to create a task that will check to see if the value limit_type and limit_item exists in default limits.conf and if so remove it.

Example Run Required:
pam_limits: domain=user1 limit_type=hard limit_item=nofile backup=yes ensure=abesnt

@kerrc kerrc changed the title module cannot remove certain limits module cannot remove certain limits pam_limits.py Oct 12, 2015
machacekondra added a commit to machacekondra/ansible-modules-extras that referenced this issue Oct 31, 2015
Now you can specify 'ensure' param, which handle if line,
should exists or not in limits.conf file.

Issue: ansible#1083
Signed-off-by: Ondra Machacek <machacek.ondra@gmail.com>
machacekondra added a commit to machacekondra/ansible-modules-extras that referenced this issue Oct 31, 2015
Now you can specify 'ensure' param, which handle if line,
should exists or not in limits.conf file.

Issue: ansible#1083
Signed-off-by: Ondra Machacek <machacek.ondra@gmail.com>
machacekondra added a commit to machacekondra/ansible-modules-extras that referenced this issue Nov 2, 2015
Now you can specify 'ensure' param, which handle if line,
should exists or not in limits.conf file.

Issue: ansible#1083
Signed-off-by: Ondra Machacek <machacek.ondra@gmail.com>
machacekondra added a commit to machacekondra/ansible-modules-extras that referenced this issue Nov 2, 2015
Now you can specify 'state' param, which handle if line,
should exists or not in limits.conf file.

Issue: ansible#1083
Signed-off-by: Ondra Machacek <machacek.ondra@gmail.com>
machacekondra added a commit to machacekondra/ansible-modules-extras that referenced this issue Dec 22, 2015
Now you can specify 'state' param, which handle if line,
should exists or not in limits.conf file.

Issue: ansible#1083
Signed-off-by: Ondra Machacek <machacek.ondra@gmail.com>
@ansibot
Copy link

ansibot commented Aug 4, 2016

@ansible ping, this issue is waiting for your response.
click here for bot help

@ansibot
Copy link

ansibot commented Sep 13, 2016

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@kerrc
Copy link
Author

kerrc commented Sep 22, 2016

Hi - What response are you waiting on from me?
Thanks

@ansibot
Copy link

ansibot commented Oct 6, 2016

@ansible, ping. This issue is still waiting on your response.
click here for bot help

@ansibot
Copy link

ansibot commented Dec 6, 2016

This repository has been locked. All new issues and pullrequests should be filed in https://github.com/ansible/ansible

Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pullrequest to the ansible/ansible repo.

@kladiv
Copy link

kladiv commented Apr 20, 2017

+1
useful to implement "create" too, if destination file different from /etc/security/limits.conf (e.g. /etc/security/limits.d/.conf)

@felipe1982
Copy link

Hi. Came here from Google looking for how to remove an entry. Tried state: absent but complained

TASK ********************
fatal: [1.2.2.2]: FAILED! => {"changed": false, "failed": true, "msg": "Unsupported parameters for (pam_limits) module: state. Supported parameters include: backup,comment,dest,domain,limit_item,limit_type,use_max,use_min,value"}

@willthames
Copy link
Contributor

Please raise a new issue on the main ansible/ansible repo, this repo is no longer in use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants