From cee5d420de79c51caf450801b7a3d0bb8f1cde02 Mon Sep 17 00:00:00 2001 From: Joshua Smith Date: Mon, 5 Feb 2018 18:21:45 -0500 Subject: [PATCH] Add examples for OpenBSD hosts. (#35691) * Add examples for OpenBSD hosts. * Incorporate changes recommended based on feedback from my pull request. --- docs/docsite/rst/intro_bsd.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/docsite/rst/intro_bsd.rst b/docs/docsite/rst/intro_bsd.rst index fda19036ac..dcc8614975 100644 --- a/docs/docsite/rst/intro_bsd.rst +++ b/docs/docsite/rst/intro_bsd.rst @@ -25,14 +25,20 @@ Bootstrapping BSD ````````````````` As mentioned above, you can bootstrap Ansible with the ``raw`` module and remotely install Python on targets. The following example installs Python 2.7 which includes the json library required for full functionality of Ansible. -On your control machine you can simply execute the following for most versions of FreeBSD:: +On your control machine you can execute the following for most versions of FreeBSD:: ansible -m raw -a "pkg install -y python27" mybsdhost1 +Or for most versions of OpenBSD:: + + ansible -m raw -a "pkg_add -z python-2.7" + + + Once this is done you can now use other Ansible modules apart from the ``raw`` module. .. note:: - This example used pkg as used on FreeBSD, however you should be able to substitute the appropriate package tool for your BSD; the package name may also differ. Refer to the package list or documentation of the BSD variant you are using for the exact Python package name you intend to install. + This example demonstrated using pkg on FreeBSD and pkg_add on OpenBSD, however you should be able to substitute the appropriate package tool for your BSD; the package name may also differ. Refer to the package list or documentation of the BSD variant you are using for the exact Python package name you intend to install. .. _python_location: @@ -43,6 +49,8 @@ To support a variety of Unix/Linux operating systems and distributions, Ansible [freebsd:vars] ansible_python_interpreter=/usr/local/bin/python2.7 + [openbsd:vars] + ansible_python_interpreter=/usr/local/bin/python2.7 If you use additional plugins beyond those bundled with Ansible, you can set similar variables for ``bash``, ``perl`` or ``ruby``, depending on how the plugin is written. For example::