Skip to content
Snippets Groups Projects
Commit 2e5395d7 authored by nimrod's avatar nimrod
Browse files

Assume that gather_facts is set to False, run the setup module when it's safe.

parent 67c52df2
No related branches found
No related tags found
No related merge requests found
......@@ -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']
......
......@@ -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' ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment