99 lines
2.5 KiB
YAML
99 lines
2.5 KiB
YAML
#
|
|
# Get CPU type:
|
|
# sh -c "clang -v -fsyntax-only -march=native -x c /dev/null 2>&1 | grep -e '-target-cpu' | sed -e 's|.*-target-cpu \([[:alnum:]]*\) .*|\1|'"
|
|
#
|
|
# Check the CPU type:
|
|
# make -C /usr/src CPUTYPE=broadwell -V MACHINE_CPU
|
|
#
|
|
# Generate options file for ports
|
|
# poudriere options -j 12amd64 -p default -z stream -f /usr/local/etc/poudriere.d/12amd64-default-stream-pkglist
|
|
#
|
|
# Generate options file for specific ports
|
|
# poudriere options -j 12amd64 -p default -z stream -c lang/gcc48
|
|
#
|
|
# Build the packages
|
|
# poudriere bulk -j 12amd64 -p default -z stream -f /usr/local/etc/poudriere.d/12amd64-default-stream-pkglist
|
|
#
|
|
# List installed packages
|
|
# pkg query -e '%a = 0' '%o' | sort
|
|
#
|
|
# Consider setting the following in the poudriere vm-bhyve config:
|
|
# priority="20"
|
|
|
|
- name: Install packages
|
|
package:
|
|
name:
|
|
- poudriere
|
|
- bash
|
|
- rsync
|
|
- flock
|
|
state: present
|
|
|
|
# - name: Create directories
|
|
# file:
|
|
# name: "{{ item }}"
|
|
# state: directory
|
|
# mode: 0755
|
|
# owner: root
|
|
# group: wheel
|
|
# loop:
|
|
# - /usr/ports/distfiles
|
|
# - /opt/poudriere/build_configs
|
|
# - /usr/local/poudriere/data/logs/bulk
|
|
|
|
- name: Install Configuration
|
|
copy:
|
|
src: "files/{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
mode: 0600
|
|
owner: root
|
|
group: wheel
|
|
loop:
|
|
- src: poudriere.conf
|
|
dest: /usr/local/etc/poudriere.conf
|
|
- src: poudriere.key
|
|
dest: /usr/local/etc/poudriere.d/poudriere.key
|
|
# - src: poudriere_deploy_ed25519
|
|
# dest: /usr/local/etc/poudriere.d/poudriere_deploy_ed25519
|
|
|
|
# - name: Install Configuration directory
|
|
# copy:
|
|
# src: "files/{{ item.src }}"
|
|
# dest: "{{ item.dest }}"
|
|
# owner: root
|
|
# group: wheel
|
|
# loop:
|
|
# - src: poudriere.d
|
|
# dest: /usr/local/etc/
|
|
|
|
- name: Install scripts
|
|
copy:
|
|
src: "files/{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
mode: 0755
|
|
owner: root
|
|
group: wheel
|
|
loop:
|
|
- src: poudboot.bash
|
|
dest: /usr/local/bin/poudboot
|
|
|
|
- name: Get ports tree list
|
|
command: poudriere ports -ln
|
|
register: ports_tree_list
|
|
changed_when: false
|
|
check_mode: no
|
|
|
|
- name: Configure the ports tree
|
|
command: poudriere ports -c -m null -M /usr/local/portshaker/trees/main -p default
|
|
when: '"default" not in ports_tree_list.stdout_lines'
|
|
|
|
- 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: poudboot
|