.. _as_tasks: Tasks ===== .. _as_main.yml: main.yml -------- Synopsis: Main task. Import tasks if enabled. [`tasks/main.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/main.yml :language: yaml :emphasize-lines: 1,2 :linenos: .. _as_aliases.yml: aliases.yml ----------- Synopsis: Configure aliases Description of the task. [`tasks/aliases.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/aliases.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_apcupsd.yml: apcupsd.yml ----------- Synopsis: Configure apcupsd Description of the task. [`tasks/apcupsd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/apcupsd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_authorized-key.yml: authorized-key.yml ------------------ Synopsis: Configure authorized-key Description of the task. [`tasks/authorized-key.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/authorized-key.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_cloud-providers.yml: cloud-providers.yml ------------------- Synopsis: Configure cloud-providers Description of the task. [`tasks/cloud-providers.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/cloud-providers.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_copy.yml: copy.yml -------- Synopsis: Configure copy Description of the task. [`tasks/copy.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/copy.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_cron.yml: cron.yml -------- Synopsis: Configure cron Description of the task. [`tasks/cron.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/cron.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_debug.yml: debug.yml --------- Synopsis: Configure debug Description of the task. [`tasks/debug.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/debug.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_devd.yml: devd.yml -------- Synopsis: Configure devd Description of the task. [`tasks/devd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/devd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_devfs.yml: devfs.yml --------- Synopsis: Configure devfs Description of the task. [`tasks/devfs.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/devfs.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_dhclient.yml: dhclient.yml ------------ Synopsis: Configure dhclient Description of the task. [`tasks/dhclient.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/dhclient.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_freebsd-update.yml: freebsd-update.yml ------------------ Synopsis: Configure freebsd-update Description of the task. [`tasks/freebsd-update.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/freebsd-update.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_fstab.yml: fstab.yml --------- Synopsis: Configure fstab Description of the task. [`tasks/fstab.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fstab.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_gitserver.yml: gitserver.yml ------------- Synopsis: Configure gitserver Description of the task. [`tasks/gitserver.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/gitserver.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_groups.yml: groups.yml ---------- Synopsis: Configure groups Description of the task. [`tasks/groups.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/groups.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_groupwrappers.yml: groupwrappers.yml ----------------- Synopsis: Configure groupwrappers Description of the task. [`tasks/groupwrappers.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/groupwrappers.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_hostapd.yml: hostapd.yml ----------- Synopsis: Configure hostapd Description of the task. [`tasks/hostapd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/hostapd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_hostname.yml: hostname.yml ------------ Synopsis: Configure hostname Description of the task. [`tasks/hostname.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/hostname.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_hosts.yml: hosts.yml --------- Synopsis: Configure hosts Description of the task. [`tasks/hosts.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/hosts.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_inetd.yml: inetd.yml --------- Synopsis: Configure inetd Description of the task. [`tasks/inetd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/inetd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_libmap.yml: libmap.yml ---------- Synopsis: Configure libmap Description of the task. [`tasks/libmap.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/libmap.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_linux.yml: linux.yml --------- Synopsis: Configure linux Description of the task. [`tasks/linux.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/linux.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_loader.yml: loader.yml ---------- Synopsis: Configure loader Description of the task. [`tasks/loader.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/loader.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_login.yml: login.yml --------- Synopsis: Configure login Description of the task. [`tasks/login.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/login.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_make.yml: make.yml -------- Synopsis: Configure make Description of the task. [`tasks/make.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/make.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_motd.yml: motd.yml -------- Synopsis: Configure motd Description of the task. [`tasks/motd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/motd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_mount-img.yml: mount-img.yml ------------- Synopsis: Configure mount-img Description of the task. [`tasks/mount-img.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/mount-img.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_mount-iso.yml: mount-iso.yml ------------- Synopsis: Configure mount-iso Description of the task. [`tasks/mount-iso.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/mount-iso.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_nfs.yml: nfs.yml ------- Synopsis: Configure NFS client. :2: Display variables. :3: Enable ``fp_nfs_debug=true``. :35: Collect status of the services stored in the list ``fp_nfs_services``. :42: Create dictionary ``fp_nfs_services_status``. :55: Test the existence of the file ``var/db/nounttab``. There is no status option of the service ``nfsclient``. Instead of starting the service, restart it if there are any nfs mountpoints. This means if the file ``/var/db/mounttab`` exists. :60: Display the result ``fp_nfs_var_db_mounttab.stat.exists``. This variable will be used to select the handler in the dictionary ``fp_nfs_handlers``. :65: Display the dictionary ``fp_nfsd_handlers``. The defaults are used in check mode because of empty dictionary ``fp_nfs_services_status``. :70: Enable services. :79: Disable services. [`tasks/nfs.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/nfs.yml :language: yaml :emphasize-lines: 2,3,35,42,55,60,65,70,79 :linenos: .. seealso:: * Handler :ref:`as_handler_nfsclient.yml` * Handler :ref:`as_handler_nfsd.yml` * .. note:: * The variables ``fp_nfs_services_enable`` (74) and ``fp_nfs_services_disable`` (83) are created by the playbook ``.configure.yml`` .. hint:: * .. warning:: * .. _as_nfsd.yml: nfsd.yml -------- Synopsis: Configure NFS server. :2: Display variables. :3: enable ``fp_nfsd_debug=true``. :60: Collect status of the services stored in the list ``fp_nfsd_services``. :67: Create dictionary ``fp_nfsd_services_status``. :73: Display this dictionary. This dictionary is used to select the handlers in the dictionary ``fp_nfsd_handlers``. :78: Display the dictionary ``fp_nfsd_handlers``. The defaults are used in check mode because of empty dictionary ``fp_nfsd_services_status``. :83: Configure ``/etc/exports`` and notify handler ``reload mountd``. :92: Enable services. :101: Disable services. [`tasks/nfsd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/nfsd.yml :language: yaml :emphasize-lines: 2,3,60,67,73,78,83,92,101 :linenos: .. seealso:: * Handler :ref:`as_handler_nfsd.yml` * Template :ref:`as_template_exports.j2` * .. note:: * The variables ``fp_nfsd_services_enable`` (96) and ``fp_nfsd_services_disable`` (105) are created by the playbook ``.configure.yml`` .. hint:: * .. warning:: * .. _as_ntp.yml: ntp.yml ------- Synopsis: Configure ntp Description of the task. [`tasks/ntp.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/ntp.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_ntpdate.yml: ntpdate.yml ----------- Synopsis: Configure ntpdate Description of the task. [`tasks/ntpdate.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/ntpdate.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_packages-install.yml: packages-install.yml -------------------- Synopsis: Configure packages-install Description of the task. [`tasks/packages-install.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/packages-install.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_packages.yml: packages.yml ------------ Synopsis: Configure packages Description of the task. [`tasks/packages.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/packages.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_passwords.yml: passwords.yml ------------- Synopsis: Configure passwords Description of the task. [`tasks/passwords.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/passwords.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_periodic.yml: periodic.yml ------------ Synopsis: Configure periodic Description of the task. [`tasks/periodic.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/periodic.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_procmail.yml: procmail.yml ------------ Synopsis: Configure procmail Description of the task. [`tasks/procmail.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/procmail.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_qemu.yml: qemu.yml -------- Synopsis: Configure qemu Description of the task. [`tasks/qemu.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/qemu.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_rcd.yml: rcd.yml ------- Synopsis: Configure rcd Description of the task. [`tasks/rcd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/rcd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_resolvconf.yml: resolvconf.yml -------------- Synopsis: Configure resolvconf Description of the task. [`tasks/resolvconf.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/resolvconf.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_sanity.yml: sanity.yml ---------- Synopsis: Configure sanity Description of the task. [`tasks/sanity.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/sanity.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_smartd.yml: smartd.yml ---------- Synopsis: Configure smartd Description of the task. [`tasks/smartd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/smartd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_snmpd.yml: snmpd.yml --------- Synopsis: Configure snmpd Description of the task. [`tasks/snmpd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/snmpd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_ssh.yml: ssh.yml ------- Synopsis: Configure ssh Description of the task. [`tasks/ssh.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/ssh.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_sshd.yml: sshd.yml -------- Synopsis: Configure sshd Description of the task. [`tasks/sshd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/sshd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_sudoers.yml: sudoers.yml ----------- Synopsis: Configure sudoers Description of the task. [`tasks/sudoers.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/sudoers.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_swap.yml: swap.yml -------- Synopsis: Configure swap Description of the task. [`tasks/swap.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/swap.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_sysctl.yml: sysctl.yml ---------- Synopsis: Configure sysctl Description of the task. [`tasks/sysctl.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/sysctl.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_syslogd.yml: syslogd.yml ----------- Synopsis: Configure syslogd Description of the task. [`tasks/syslogd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/syslogd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_syslog-ng.yml: syslog-ng.yml ------------- Synopsis: Configure syslog-ng Description of the task. [`tasks/syslog-ng.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/syslog-ng.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_timezone.yml: timezone.yml ------------ Synopsis: Configure timezone Description of the task. [`tasks/timezone.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/timezone.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_tmpmfs.yml: tmpmfs.yml ---------- Synopsis: Configure tmpmfs Description of the task. [`tasks/tmpmfs.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/tmpmfs.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_users.yml: users.yml --------- Synopsis: Configure users Description of the task. [`tasks/users.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/users.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_vars.yml: vars.yml -------- Synopsis: Configure vars Description of the task. [`tasks/vars.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/vars.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_wpasupplicant.yml: wpasupplicant.yml ----------------- Synopsis: Configure wpasupplicant Description of the task. [`tasks/wpasupplicant.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/wpasupplicant.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_digitalocean.yml: digitalocean.yml ---------------- Synopsis: Configure digitalocean Description of the task. [`tasks/cloud-providers/digitalocean.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/cloud-providers/digitalocean.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_sync-default.yml: sync-default.yml ---------------- Synopsis: Configure sync-default Description of the task. [`tasks/copy/sync-default.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/copy/sync-default.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_sync-optional.yml: sync-optional.yml ----------------- Synopsis: Configure sync-optional Description of the task. [`tasks/copy/sync-optional.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/copy/sync-optional.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_unarch-default.yml: unarch-default.yml ------------------ Synopsis: Configure unarch-default Description of the task. [`tasks/copy/unarch-default.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/copy/unarch-default.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_unarch-optional.yml: unarch-optional.yml ------------------- Synopsis: Configure unarch-optional Description of the task. [`tasks/copy/unarch-optional.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/copy/unarch-optional.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_cron-rename-entry.yml: cron-rename-entry.yml --------------------- Synopsis: Configure cron-rename-entry Description of the task. [`tasks/fn/cron-rename-entry.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/cron-rename-entry.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_mdconfig-attach-disk.yml: mdconfig-attach-disk.yml ------------------------ Synopsis: Configure mdconfig-attach-disk Description of the task. [`tasks/fn/mdconfig-attach-disk.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/mdconfig-attach-disk.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_mdconfig-detach-disk.yml: mdconfig-detach-disk.yml ------------------------ Synopsis: Configure mdconfig-detach-disk Description of the task. [`tasks/fn/mdconfig-detach-disk.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/mdconfig-detach-disk.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_rcconf-item.yml: rcconf-item.yml --------------- Synopsis: Configure rcconf-item Description of the task. [`tasks/fn/rcconf-item.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/rcconf-item.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_rcconf.yml: rcconf.yml ---------- Synopsis: Configure a service in rc.conf :4-24: Declare local variables for given ``_service`` :27: Display local variables if ``fp_rcconf_debug=true``. :52: Configure ``_service`` in rc.conf :67: Configure ``rcvar`` for the ``_service`` in rc.conf :80: Optionally, start/stop ``_service`` immediately. See :ref:`qa_how_rcconf_works` Example of ``_service=sshd`` :: shell> ansible-playbook pb.yml -t fp_sshd -e fp_sshd_debug=true -e fp_rcconf_debug=true ... TASK [vbotka.freebsd_postinstall : Rcconf: Debug fp_rcconf_debug=true] ***************** ok: [test.example.org] => msg: |- fp_rcconfd: False fp_rcconf_sanity_rcvar: True _service: sshd _rcconfd_path: /etc/rc.conf.d/sshd _path: /etc/rc.conf _var: fp_sshd_enable _val: True _name: sshd_enable _value: YES _command: start _handlers: ['start sshd'] _handlers_reload: ['reload sshd'] _rcconf_var: fp_sshd_rcconf _rcconf_val: [] _notify_var: fp_sshd_notify _notify_val: True _service_task_var: fp_sshd_service_task _service_task_val: False ... [`tasks/fn/rcconf.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/rcconf.yml :language: yaml :emphasize-lines: 4-24,27,52,67,80 :linenos: .. seealso:: * :ref:`ug_rc` * defaults/main/rcconf.yml * defaults/main/rcconfd.yml * defaults/main/handlers.yml