.. _ug_examples: Examples ******** :001-: Manage iocage :010-: `Module`_, `Inventory`_ and `Filter`_ ``vbotka.freebsd.iocage`` :040-: Other plugins :200-: Ansible client :300-: Modules :310-: `Role vbotka.freebsd.postinstall`_ :320-: `Role vbotka.freebsd.packages`_ :330-: `Role vbotka.freebsd.iocage`_ :340-: `Role vbotka.freebsd.config_light`_ :350-: `Role vbotka.freebsd.rsnapshot`_ :360-: `Role vbotka.freebsd.network`_ :370-: `Role vbotka.freebsd.pf`_ :380-: `Role vbotka.freebsd.custom_image`_ :390-: `Role vbotka.freebsd.poudriere`_ :400-: `Role vbotka.freebsd.zfs`_ :410-: `Role vbotka.freebsd.lib`_ :420-: `Role vbotka.freebsd.apache`_ :430-: `Role vbotka.freebsd.certificate`_ :440-: `Role vbotka.freebsd.dhcp`_ :500-: Infrastructure .. note:: * The examples that create jails use by default the iocage host setting created in the example :ref:`example_440`. The firewall is on the external interface and on the ``vnet`` bridge of the iocage host. The DHCP for the jails is on the bridge. The SSH from the local network to the jails is redirected. The examples that do not use this setting are marked ``.deny``. This means, they are not included in ``batch.sh``. To run these examples, reconfigure the firewall. See the example :ref:`example_370`. * All examples comprise additional files not shown in the files' tree. See them to learn more details. * The examples comprise ``batch.sh`` that runs the commands and creates the output for the examples. * Most plays in ``batch.sh`` are idempotent. The output of such a play may show status ``ok`` instead of expected ``changed`` if the play has been run repeatedly. * The playbooks in the examples use dashes ``-`` in their filenames. For example, ``pb-iocage.yml``. * The playbooks in the collection, because of the Ansible collection naming conventions, use underscores ``_`` in their filenames. For example, ``pb_iocage_template.yml``. * To avoid connection errors in examples where DHCP is used, ``host_key_checking = false`` can be set in ``ansible.cfg``. .. hint:: See :ref:`dg_update_examples`. .. toctree:: :maxdepth: 1 :caption: Manage iocage 001 Debug vars and install iocage 002 Activate iocage 003 Audit iocage hosts .. toctree:: :maxdepth: 1 :caption: iocage module, inventory, and filter 010 Clone jails and create inventory examples/011/example.rst examples/012/example.rst examples/013/example.rst examples/014/example.rst examples/015/example.rst examples/016/example.rst examples/017/example.rst examples/018/example.rst examples/019/example.rst examples/020/example.rst examples/030/example.rst .. toctree:: :maxdepth: 1 :caption: Plugins examples/040/example.rst examples/050/example.rst .. toctree:: :maxdepth: 1 :caption: Ansible client 200 iocage templates 201 iocage datasets 202 DHCP iocage templates 203 DHCP, auto UUID, iocage_tags 204 DHCP, auto UUID, iocage_tags v2 206 DHCP and fixed IP clients 207 DHCP, auto UUID, tags, class 208 DHCP, ansible_client_pull 209 pkglist, ansible_client_apache 210 iocage notes and tags .. toctree:: :maxdepth: 1 :caption: Modules examples/300/example.rst examples/301/example.rst .. toctree:: :maxdepth: 1 :caption: Roles 310 Configure and audit Ansible clients 320 Install and audit packages 321 Create package repo configuration 330 Clone jails and create inventory 340 Install and configure lighttpd 350 Install and configure rsnapshot examples/360/example.rst examples/361/example.rst examples/370/example.rst examples/380/example.rst examples/390/example.rst examples/400/example.rst 410 Include vars from conf.d 411 Include vars from nested dirs 420 Configure Apache server 421 Configure Apache server vhost 422 Configure Apache server PHP 423 Configure Apache server build 430 Configure Apache server SSL examples/440/example.rst examples/441/example.rst examples/442/example.rst examples/443/example.rst .. toctree:: :maxdepth: 1 :caption: Infrastructure 500 syslog-ng server and clients examples/501/example.rst examples/502/example.rst examples/510/example.rst examples/520/example.rst 521 Iocage plugins ansible-pull* .. _Module: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/module/iocage .. _Inventory: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/inventory/iocage .. _Filter: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/filter/iocage .. _Module vbotka.freebsd.service: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/module/service .. _Module vbotka.freebsd.ucl: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/module/ucl .. _Role vbotka.freebsd.apache: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/apache .. _Role vbotka.freebsd.certificate: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/certificate .. _Role vbotka.freebsd.config_light: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/config_light .. _Role vbotka.freebsd.custom_image: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/custom_image .. _Role vbotka.freebsd.dhcp: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/dhcp .. _Role vbotka.freebsd.iocage: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/iocage .. _Role vbotka.freebsd.lib: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/lib .. _Role vbotka.freebsd.network: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/network .. _Role vbotka.freebsd.packages: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/packages .. _Role vbotka.freebsd.pf: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/pf .. _Role vbotka.freebsd.postinstall: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/postinstall .. _Role vbotka.freebsd.poudriere: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/poudriere .. _Role vbotka.freebsd.rsnapshot: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/rsnapshot .. _Role vbotka.freebsd.zfs: https://galaxy.ansible.com/ui/repo/published/vbotka/freebsd/content/role/zfs