mirror of
https://github.com/rocky-linux/ansible-role-kojid.git
synced 2024-12-14 15:28:30 +00:00
add limit capabilities
This commit is contained in:
parent
fa4b4c1635
commit
aed5dfe773
@ -68,3 +68,7 @@ kojid_buildtools_repo_gpgkey: RPM-GPG-KEY-Rocky-Infra
|
||||
# "production" and "staging" are the predetermined names and are sorted
|
||||
# as such.
|
||||
kojid_shared_builders: false
|
||||
|
||||
# Define ulimits to avoid alloc issues
|
||||
kojid_ulimits_conf: false
|
||||
kojid_ulimits_nofiles: 10240
|
||||
|
@ -1,2 +0,0 @@
|
||||
#<domain> <type> <item> <value>
|
||||
* - nofile 4096
|
@ -11,9 +11,9 @@
|
||||
reload: true
|
||||
when: ansible_architecture == 'armv7l'
|
||||
|
||||
- name: Set nofile limit to 4096
|
||||
ansible.builtin.copy:
|
||||
src: 00-limit.conf
|
||||
- name: Set nofile limit to 10240
|
||||
ansible.builtin.template:
|
||||
template: 00-limit.conf.j2
|
||||
dest: /etc/security/limits.d/00-limit.conf
|
||||
owner: root
|
||||
group: root
|
||||
@ -59,8 +59,8 @@
|
||||
|
||||
# systemd override
|
||||
- name: Override kojid.service
|
||||
ansible.builtin.copy:
|
||||
src: kojid.service
|
||||
ansible.builtin.template:
|
||||
template: kojid.service.j2
|
||||
dest: /etc/systemd/system/kojid.service
|
||||
owner: root
|
||||
group: root
|
||||
|
7
templates/00-limit.conf.js
Normal file
7
templates/00-limit.conf.js
Normal file
@ -0,0 +1,7 @@
|
||||
#<domain> <type> <item> <value>
|
||||
{% if kojid_ulimits_conf %}
|
||||
kojibuilder soft nofile {{ kojid_ulimits_nofiles }}
|
||||
kojibuilder hard nofile {{ kojid_ulimits_nofiles }}
|
||||
{% else %}
|
||||
* - nofile 4096
|
||||
{% endif %}
|
@ -13,5 +13,10 @@ ExecStart=/usr/sbin/kojid \
|
||||
--verbose
|
||||
ExecReload=/bin/kill -USR1 $MAINPID
|
||||
|
||||
{% if kojid_ulimits_conf %}
|
||||
LimitNOFILE={{ kojid_ulimits_nofiles }}
|
||||
LimitNOFILESoft={{ kojid_ulimits_nofiles }}
|
||||
{% endif %}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,10 +1,15 @@
|
||||
config_opts['plugin_conf']['package_state_enable'] = False
|
||||
config_opts['plugin_conf']['ccache_enable'] = False
|
||||
# Managed by Ansible
|
||||
{% if kojid_disable_bootstrap_chroot %}
|
||||
config['use_bootstrap'] = False
|
||||
{% endif %}
|
||||
|
||||
{% if kojid_ulimits_conf %}
|
||||
config_opts['nspawn_args'] += ['--rlimit=RLIMIT_NOFILE={{ kojid_ulimits_nofiles }}']
|
||||
{% endif %}
|
||||
|
||||
config_opts['dnf_common_opts'] = ['--setopt=install_weak_deps=0']
|
||||
config_opts['macros']['%bugurl'] = '{{ kojid_bugzilla }}'
|
||||
config_opts['nosync'] = True
|
||||
config_opts['nosync_force'] = True
|
||||
config_opts['environment']['LANG'] = 'C.UTF-8'
|
||||
config_opts['use_bootstrap'] = True
|
||||
config_opts['yum_install_command'] += " -x devtoolset*"
|
||||
config_opts['dnf_warning'] = False
|
||||
|
Loading…
Reference in New Issue
Block a user