2024-05-13 03:23:09 +00:00
|
|
|
- name: Set timezone
|
|
|
|
file:
|
|
|
|
src: "/usr/share/zoneinfo/{{ timezone|default('UTC') }}"
|
|
|
|
dest: /etc/localtime
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
state: link
|
|
|
|
|
2022-10-13 00:30:11 +00:00
|
|
|
- name: Install packages
|
|
|
|
package:
|
|
|
|
name:
|
|
|
|
- pstree
|
2022-10-30 01:47:32 +00:00
|
|
|
- gsed
|
2023-03-07 14:57:51 +00:00
|
|
|
- gmake
|
2023-04-23 20:19:16 +00:00
|
|
|
- rust-coreutils
|
2022-10-13 00:30:11 +00:00
|
|
|
state: present
|
|
|
|
|
2024-04-28 16:53:25 +00:00
|
|
|
- name: Install service configuration
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item }}_rc.conf"
|
|
|
|
dest: "/etc/rc.conf.d/{{ item }}"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
|
|
|
- cleartmp
|
|
|
|
|
2022-10-14 05:44:29 +00:00
|
|
|
- name: Install login.conf
|
|
|
|
copy:
|
|
|
|
src: login.conf
|
|
|
|
dest: /etc/login.conf
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
mode: 0644
|
|
|
|
register: login_config
|
|
|
|
|
|
|
|
- name: Update cap_mkdb
|
|
|
|
command: cap_mkdb /etc/login.conf
|
|
|
|
when: login_config.changed
|
|
|
|
|
2022-10-14 05:52:42 +00:00
|
|
|
- name: Enable periodic scrub
|
|
|
|
community.general.sysrc:
|
|
|
|
name: daily_scrub_zfs_enable
|
|
|
|
value: "YES"
|
|
|
|
path: /etc/periodic.conf.local
|
|
|
|
|
|
|
|
- name: Set scrub interval
|
|
|
|
community.general.sysrc:
|
|
|
|
name: daily_scrub_zfs_default_threshold
|
|
|
|
value: "7"
|
|
|
|
path: /etc/periodic.conf.local
|
2022-10-14 05:59:15 +00:00
|
|
|
|
|
|
|
- name: Install loader.conf
|
|
|
|
copy:
|
|
|
|
src: "{{loader_conf}}"
|
|
|
|
dest: /boot/loader.conf
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
mode: 0644
|
|
|
|
when: loader_conf is defined
|
|
|
|
|
|
|
|
- name: Delete loader.conf
|
|
|
|
file:
|
|
|
|
path: /boot/loader.conf
|
|
|
|
state: absent
|
|
|
|
when: loader_conf is not defined
|
2022-10-14 05:44:29 +00:00
|
|
|
|
2022-10-14 05:55:15 +00:00
|
|
|
- name: Install rc.conf
|
|
|
|
copy:
|
|
|
|
src: "{{rc_conf}}"
|
|
|
|
dest: /etc/rc.conf
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
when: rc_conf is defined
|
|
|
|
|
|
|
|
- name: Delete rc.conf
|
|
|
|
file:
|
|
|
|
path: /etc/rc.conf
|
2022-11-01 01:28:35 +00:00
|
|
|
state: absent
|
2022-10-14 05:55:15 +00:00
|
|
|
when: rc_conf is not defined
|
2022-10-17 19:15:09 +00:00
|
|
|
|
2022-11-02 02:42:46 +00:00
|
|
|
- name: Install scripts
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "{{ item.dest }}"
|
|
|
|
mode: 0755
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
|
|
|
- src: bemount.bash
|
|
|
|
dest: /usr/local/bin/bemount
|
2023-07-03 16:54:10 +00:00
|
|
|
- src: watch_freebsd
|
|
|
|
dest: /usr/local/bin/ww
|
2022-11-02 02:42:46 +00:00
|
|
|
|
|
|
|
- name: Install rc script
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item.src }}"
|
|
|
|
dest: "/usr/local/etc/rc.d/{{ item.dest|default(item.src) }}"
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
mode: 0755
|
|
|
|
loop:
|
|
|
|
- src: bemount_rc.sh
|
|
|
|
dest: bemount
|
|
|
|
|
|
|
|
- name: Enable bemount
|
|
|
|
community.general.sysrc:
|
|
|
|
name: bemount_enable
|
|
|
|
value: "YES"
|
|
|
|
path: /etc/rc.conf.d/bemount
|
2022-11-12 21:38:14 +00:00
|
|
|
|
|
|
|
- name: Install loader.conf
|
|
|
|
copy:
|
|
|
|
src: "files/{{ item }}_loader.conf"
|
|
|
|
dest: "/boot/loader.conf.d/{{ item }}.conf"
|
|
|
|
mode: 0644
|
|
|
|
owner: root
|
|
|
|
group: wheel
|
|
|
|
loop:
|
|
|
|
- disk_labels
|