ansible-freebsd-jailhost-tools/tasks/chroot/preinstall_set.yml

37 lines
949 B
YAML

- name: Create local repo config dir
file:
path: '{{ vars["jail_" + jail_name + "_new_path"] }}/usr/local/etc/pkg/repos'
state: directory
- name: Copy FreeBSD repo config in place
copy:
src: FreeBSD.conf
dest: '{{ vars["jail_" + jail_name + "_new_path"] }}/usr/local/etc/pkg/repos/FreeBSD.conf'
- name: Create resolv.conf for install usage in jail
copy:
dest: '{{ vars["jail_" + jail_name + "_new_path"] }}/etc/resolv.conf'
content: |
nameserver 127.0.0.1
- name: Mounting devFS into chroot for pkg
mount:
src: devfs
fstab: /tmp/delete-me-fstab
path: '{{ vars["jail_" + jail_name + "_new_path"] }}/dev'
fstype: devfs
state: mounted
- name: Mounting directories
command:
/sbin/mount
-a -F
{{ dynamic_jails_path }}/configs/{{ vars["jail_" + jail_name + "_newest_id"] }}/fstab
args:
warn: no
- name: Restarting syslog
service:
name: syslogd
state: restarted