machine_setup/ansible/roles/build/tasks/freebsd.yaml

95 lines
1.9 KiB
YAML
Raw Normal View History

2022-10-16 01:40:41 +00:00
- name: Install packages
package:
name:
- git
state: present
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0755
owner: "{{ build_user.name }}"
group: "{{ build_user.group }}"
loop:
- "/usr/src"
# - "/usr/ports"
2022-10-16 01:40:41 +00:00
- "/usr/obj"
- name: chown the FreeBSD source
file:
name: "{{ item }}"
state: directory
owner: "{{ build_user.name }}"
group: "{{ build_user.group }}"
recurse: true
loop:
- "/usr/src"
- name: Clone FreeBSD Source
git:
repo: "https://git.FreeBSD.org/src.git"
dest: /usr/src
version: "{{ freebsd_version }}"
force: true
become: true
become_user: "{{ build_user.name }}"
diff: false
2023-05-01 20:40:07 +00:00
# - name: Clone Ports Tree
# git:
# repo: "https://git.FreeBSD.org/ports.git"
# dest: /usr/ports
# version: "main"
# force: true
# update: false
# become: true
# become_user: "{{ build_user.name }}"
# diff: false
2022-10-16 01:40:41 +00:00
- name: Install Configuration
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0644
owner: root
group: wheel
loop:
- src: make.conf
dest: /etc/make.conf
- name: Install Configuration
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0644
2022-10-16 05:02:44 +00:00
owner: "{{ build_user.name }}"
group: "{{ build_user.group }}"
loop:
2022-10-16 01:40:41 +00:00
- src: CUSTOM
dest: /usr/src/sys/amd64/conf/CUSTOM
- name: Install Configuration
template:
src: "templates/{{ item.src }}.j2"
dest: "{{ item.dest }}"
mode: 0644
2022-10-16 05:02:44 +00:00
owner: root
group: wheel
2022-10-16 01:40:41 +00:00
loop:
- src: src.conf
dest: /etc/src.conf
- name: Install scripts
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0700
owner: "{{ build_user.name }}"
group: "{{ build_user.group }}"
loop:
- src: freebsd_update_step1
dest: /usr/local/bin/freebsd_update_step1
- src: freebsd_update_step2
dest: /usr/local/bin/freebsd_update_step2