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

35 lines
714 B
YAML
Raw Normal View History

2022-11-25 20:02:15 +00:00
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0755
owner: root
group: wheel
loop:
- /usr/local/etc/pkg
- /usr/local/etc/pkg/repos
- name: Install Configuration
register: changed_config
copy:
src: "files/{{ item.src }}"
dest: "{{ item.dest }}"
mode: 0644
owner: root
group: wheel
loop:
- src: FreeBSD.conf
dest: /usr/local/etc/pkg/repos/FreeBSD.conf
2023-03-04 19:08:03 +00:00
- src: pkg.conf
dest: /usr/local/etc/pkg.conf
2022-11-25 20:02:15 +00:00
# - name: Replace all packages with packages from new repo
# command: pkg upgrade -f -y
# when: changed_config.changed
2023-03-04 19:08:03 +00:00
- name: Install packages
package:
name:
- pkg-provides
state: present