Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsi committed Oct 1, 2024
1 parent 2319dde commit d128670
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions roles/nox/tasks/01-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,37 @@
system: true
shell: "/sbin/nologin"
group: "{{ nox_group }}"
groups:
- libvirt
create_home: false
state: present

- name: add nox user to libvirt group
ansible.builtin.user:
name: "libvirt-qemu"
groups:
- "{{ nox_group }}"
create_home: false
state: present

- name: increase ulimits for nox user
ansible.builtin.pam_limits:
args: "{{ limit }}"
loop_control:
loop_var: "limit"
label: "{{ limit.domain }} {{ limit.limit_item }}:{{ limit.limit_type }}"
loop:
- domain: "nox"
limit_type: "hard"
limit_item: "nofile"
comment: "Increse max open file hard limit"
value: 65536
- domain: "nox"
limit_type: "soft"
limit_item: "nofile"
comment: "Increse max open file soft limit"
value: 65536

- name: cleanup nox state
ansible.builtin.file:
path: "{{ nox_dir }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/prerequisites/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
state: started
enabled: true
daemon_reload: true

- name: enable default network
community.libvirt.virt_net:
autostart: true
Expand Down

0 comments on commit d128670

Please sign in to comment.