diff --git a/README.rst b/README.rst index 240eb6bb8071c83205a2f6b6d6018492dfed6485..835bda285b115f04c5bcc53b3123f29c5b636988 100644 --- a/README.rst +++ b/README.rst @@ -2,8 +2,10 @@ Ansible-common ############## An Ansible role with common tasks that ran on all (or most) hosts. -The tls_key_path, tls_cert_path and tls_ca_cert_path facts are added to point to -the path of the host's key and cert. +The tls_key_path, tls_cert_path and tls_ca_cert_path facts are added to point +to the path of the host's key and cert. Gathering facts on the first run on an +OpenBSD system fails, so the role runs the setup module in case gather_facts +was set to False. Requirements ------------ @@ -50,6 +52,7 @@ Example Playbook - hosts: - all + gather_facts: False roles: - role: common extra_tls_certs: ['vagrant.crt', 'example.com.crt'] diff --git a/tasks/main.yml b/tasks/main.yml index 78242c4d74757a275285a9fff02ff773d8df7a3a..b849f6eec832ab6edd45ea6d4a27a0caef1f141b 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,6 +4,9 @@ - include: openbsd_bootstrap.yml when: openbsd_bootstrap is defined +- setup: + when: openbsd_bootstrap is undefined + - name: Assert assert: that: ansible_os_family in [ 'Debian', 'OpenBSD' ]