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

51 lines
1.1 KiB
YAML

- name: Install packages
package:
name:
- git
- tmux # For convenience
- htop # For convenience
- bash
state: present
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0755
owner: "{{ build_user.name }}"
group: "{{ build_user.group }}"
loop:
- /opt/freebsd_update_server
- name: Clone freebsd-update-build
git:
repo: "https://github.com/freebsd/freebsd-update-build.git"
dest: /opt/freebsd_update_server/freebsd-update-build
version: "28bb3ae7de9c1332fe8a366fb154a5b9faf37f49"
force: true
become: true
become_user: "{{ build_user.name }}"
diff: false
- name: Install Configuration
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0600
owner: "{{ build_user.name }}"
group: "{{ build_user.group }}"
loop:
- src: release.conf
dest: /opt/freebsd_update_server/release.conf
- name: Install scripts
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0755
owner: root
group: wheel
loop:
- src: build_release.bash
dest: /usr/local/bin/build_release