|
|
@@ -16,6 +16,18 @@
|
|
|
createhome: true
|
|
|
state: present
|
|
|
|
|
|
+ - name: Create pkgng custom repo config directory
|
|
|
+ file:
|
|
|
+ path: /usr/local/etc/pkg/repos/
|
|
|
+ state: directory
|
|
|
+
|
|
|
+ - name: Install sensu repo
|
|
|
+ template:
|
|
|
+ src: sensu-freebsd-repo.conf.j2
|
|
|
+ dest: /usr/local/etc/pkg/repos/sensu.conf
|
|
|
+ notify:
|
|
|
+ - Update pkgng database
|
|
|
+
|
|
|
- name: Install prerequisite packages
|
|
|
pkgng:
|
|
|
name: "{{ item }}"
|
|
|
@@ -24,12 +36,7 @@
|
|
|
- bash
|
|
|
- ca_root_nss
|
|
|
|
|
|
- - name: Retrieve the sensu txz package
|
|
|
- get_url:
|
|
|
- url: "{{ sensu_pkg_download_url }}"
|
|
|
- dest: "{{ sensu_pkg_download_path }}"
|
|
|
- register: sensu_txz
|
|
|
-
|
|
|
- - name: Install sensu from the retrieved txz package
|
|
|
- command: "pkg add {{ sensu_pkg_download_path }}"
|
|
|
- when: sensu_txz|changed
|
|
|
+ - name: Install sensu
|
|
|
+ pkgng:
|
|
|
+ name: "sensu{% if sensu_pkg_version %}-{{ sensu_pkg_version }}{% endif %}"
|
|
|
+ state: present
|