diff --git a/0x1B-web_stack_debugging_4/0-the_sky_is_the_limit_not.pp b/0x1B-web_stack_debugging_4/0-the_sky_is_the_limit_not.pp new file mode 100644 index 0000000..23e0435 --- /dev/null +++ b/0x1B-web_stack_debugging_4/0-the_sky_is_the_limit_not.pp @@ -0,0 +1,6 @@ +# Manifest to fix Nginx open file limit configuration +exec { 'nginx fix': + onlyif => 'test -e /etc/default/nginx', + command => "sed -i s/'-n 15'/'-n 4096'/g /etc/default/nginx; service nginx restart", + provider => 'shell' +} diff --git a/0x1B-web_stack_debugging_4/1-user_limit.pp b/0x1B-web_stack_debugging_4/1-user_limit.pp new file mode 100644 index 0000000..8deda03 --- /dev/null +++ b/0x1B-web_stack_debugging_4/1-user_limit.pp @@ -0,0 +1,10 @@ +# Puppet manifest to increase file limits of user +exec { 'file limit config': + command => "sed -i s/'nofile 5'/'nofile 100'/g /etc/security/limits.conf", + path => '/bin' +} + +exec { 'file limit config_2': + command => "sed -i s/'nofile 4'/'nofile 100'/g /etc/security/limits.conf", + path => '/bin' +} diff --git a/0x1B-web_stack_debugging_4/README.md b/0x1B-web_stack_debugging_4/README.md new file mode 100644 index 0000000..39b80a1 --- /dev/null +++ b/0x1B-web_stack_debugging_4/README.md @@ -0,0 +1,2 @@ +0x1B. Web stack debugging #4 +