.. _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_acpi.yml: acpi.yml -------- Synopsis: Configure acpi Description of the task. [`tasks/acpi.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/acpi.yml :language: yaml :emphasize-lines: 1 :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: .. seealso:: * Handler :ref:`as_handler_newaliases.yml` * Template :ref:`as_template_aliases.j2` .. _as_apt.yml: apt.yml ------- Synopsis: Configure apt Description of the task. [`tasks/apt.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/apt.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Template :ref:`as_template_apt_confd.j2` .. _as_apparmor.yml: apparmor.yml ------------ Synopsis: Configure apparmor Description of the task. [`tasks/apparmor.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/apparmor.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_authorized_keys.yml: authorized_keys.yml ------------------- Synopsis: Configure authorized_keys Description of the task. [`tasks/authorized_keys.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/authorized_keys.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_autofs.yml: autofs.yml ---------- Synopsis: Configure autofs Description of the task. [`tasks/autofs.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/autofs.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_autofs.yml` .. _as_auto_upgrades.yml: auto_upgrades.yml ----------------- Synopsis: Configure auto_upgrades Description of the task. [`tasks/auto_upgrades.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/auto_upgrades.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_bluetooth.yml: bluetooth.yml ------------- Synopsis: Configure bluetooth Description of the task. [`tasks/bluetooth.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/bluetooth.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_bluetooth.yml` .. _as_chrony.yml: chrony.yml ---------- Synopsis: Configure chrony Description of the task. [`tasks/chrony.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/chrony.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_debsums.yml: debsums.yml ----------- Synopsis: Configure debsums Description of the task. [`tasks/debsums.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/debsums.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_dnsmasq.yml: dnsmasq.yml ----------- Synopsis: Configure dnsmasq Description of the task. [`tasks/dnsmasq.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/dnsmasq.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_gpg.yml: gpg.yml ------- Synopsis: Configure gpg Description of the task. [`tasks/gpg.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/gpg.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_gpg.yml` * Template :ref:`as_template_gpg.conf.j2` .. _as_gpsd.yml: gpsd.yml -------- Synopsis: Configure gpsd Description of the task. [`tasks/gpsd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/gpsd.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_gpsd.yml` * Handler :ref:`as_handler_bluetooth.yml` * Template :ref:`as_template_gpsd.j2` .. _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_grub.yml: grub.yml -------- Synopsis: Configure grub Description of the task. [`tasks/grub.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/grub.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_grub.yml` .. _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: .. seealso:: * Template :ref:`as_template_hosts.j2` .. _as_iptables.yml: iptables.yml ------------ Synopsis: Configure iptables Description of the task. [`tasks/iptables.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/iptables.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_iptables.yml` * Template :ref:`as_template_iptables_restore.j2` * Template :ref:`as_template_default_iptables.j2` * Template :ref:`as_template_router1_iptables.j2` .. _as_kvm.yml: kvm.yml ------- Synopsis: Configure kvm Description of the task. [`tasks/kvm.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/kvm.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_latex.yml: latex.yml --------- Synopsis: Configure latex Description of the task. [`tasks/latex.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/latex.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_libvirt.yml: libvirt.yml ----------- Synopsis: Configure libvirt Description of the task. [`tasks/libvirt.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/libvirt.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_lid.yml: lid.yml ------- Synopsis: Configure lid Description of the task. [`tasks/lid.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/lid.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_messages.yml` .. _as_logrotate.yml: logrotate.yml ------------- Synopsis: Configure logrotate Description of the task. [`tasks/logrotate.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/logrotate.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_modemmanager.yml: modemmanager.yml ---------------- Synopsis: Configure modemmanager Description of the task. [`tasks/modemmanager.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/modemmanager.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_modules.yml: modules.yml ----------- Synopsis: Configure modules Description of the task. [`tasks/modules.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/modules.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_netplan.yml: netplan.yml ----------- Synopsis: Configure netplan Description of the task. [`tasks/netplan.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/netplan.yml :language: yaml :emphasize-lines: 1 :linenos: .. seealso:: * Handler :ref:`as_handler_netplan.yml` * Template :ref:`as_template_netplan_default.j2` * Template :ref:`as_template_netplan_conf.j2` .. _as_networkd.yml: networkd.yml ------------ Synopsis: Configure networkd Description of the task. [`tasks/networkd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/networkd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_networkmanager.yml: networkmanager.yml ------------------ Synopsis: Configure networkmanager Description of the task. [`tasks/networkmanager.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/networkmanager.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_nfsd.yml: nfsd.yml -------- Synopsis: Configure nfsd Description of the task. [`tasks/nfsd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/nfsd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_packages.yml: packages.yml ------------ Synopsis: Manage packages. Dynamic variables (4) ^^^^^^^^^^^^^^^^^^^^^ TBD Debug (13) ^^^^^^^^^^ TBD Install packages automatically (41) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If enabled (52) and not empty (53) import ``install_package.yml`` (44) from the role ``vbotka.linux_lib`` (43). Flatten and filter *unique* items in the lists ``my_packages_auto`` (46). Set it to the mandatory variable ``ll_ipkg_list``. Optionally, set other variables (47-50). Install packages (56) ^^^^^^^^^^^^^^^^^^^^^ If not empty (66) TBD Remove packages (69) ^^^^^^^^^^^^^^^^^^^^ TBD [`tasks/packages.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/packages.yml :language: yaml :emphasize-lines: 2,4,13,41,56,69 :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_pm_utils.yml: pm_utils.yml ------------ Synopsis: Configure pm_utils Description of the task. [`tasks/pm_utils.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/pm_utils.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_postfix.yml: postfix.yml ----------- Synopsis: Configure postfix Description of the task. [`tasks/postfix.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/postfix.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_rc_local.yml: rc_local.yml ------------ Synopsis: Configure rc_local Description of the task. [`tasks/rc_local.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/rc_local.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_reboot.yml: reboot.yml ---------- Synopsis: Configure reboot Description of the task. [`tasks/reboot.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/reboot.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_repos.yml: repos.yml --------- Synopsis: Configure repos Description of the task. [`tasks/repos.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/repos.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_service.yml: service.yml ----------- Synopsis: Manage services. Debug (4) ^^^^^^^^^ TBD Sanity (23) ^^^^^^^^^^^ TBD Automatic management of listed services (74) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When not empty (75) iterate ``my_services_varnames`` (97) (See default s/main/service.yml). Skip when ``run_task`` (80) is not *True*. Manual management of listed services (104) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ When not empty (105) iterate ``lp_service`` in the included tasks (115). When *auto* (110) set the module (112) to ``ansible_service_mgr`` (OS native service manager found by the *setup*). TBC Flush handlers (117) ^^^^^^^^^^^^^^^^^^^^ Automatic management of listed services notifies ``ansible_service_mgr``. See the tasks service-\*.yml how manual management options notify handlers. [`tasks/service.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/service.yml :language: yaml :emphasize-lines: 2,4,23,74,104,117 :linenos: .. _as_service-service.yml: service-service.yml ------------------- Synopsis: Configure service-service Description of the task. [`tasks/fn/service-service.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/service-service.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_service-systemd.yml: service-systemd.yml ------------------- Synopsis: Configure service-systemd Description of the task. [`tasks/fn/service-systemd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/service-systemd.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_service-sysvinit.yml: service-sysvinit.yml -------------------- Synopsis: Configure service-sysvinit Description of the task. [`tasks/fn/service-sysvinit.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/service-sysvinit.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_service-debug.yml: service-debug.yml ----------------- Synopsis: Configure service-debug Description of the task. [`tasks/fn/service-debug.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/fn/service-debug.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_smart.yml: smart.yml --------- Synopsis: Configure smart Description of the task. [`tasks/smart.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/smart.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_snap.yml: snap.yml -------- Synopsis: Configure snap Description of the task. [`tasks/snap.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/snap.yml :language: yaml :emphasize-lines: 1 :linenos: .. _as_speechd.yml: speechd.yml ----------- Synopsis: Configure speechd Description of the task. [`tasks/speechd.yml `_] .. highlight:: yaml :linenothreshold: 5 .. literalinclude:: ../../tasks/speechd.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_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_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_systemd.yml: systemd.yml ----------- Synopsis: Configure systemd. Set my_services (4) ^^^^^^^^^^^^^^^^^^^^ Iterate ``lp_systemd_unit`` (24) and create dictionary ``my_services``. It will be used by handlers to decide if and how to reload or restart services .. code-block:: yaml my_services: .: state: restart_or_reload: ... Debug (28) ^^^^^^^^^^ To see the values of the variables run the playbook with options ``-t lp_systemd_debug -e lp_systemd_debug=True`` (29). Packages (54) ^^^^^^^^^^^^^ Install packages when enabled (55). Configure systemd (67) ^^^^^^^^^^^^^^^^^^^^^^ Use ``community.general.ini_file`` (72) to configure files in loop (83). Register ``lp_systemd_conf_changes`` (82) and notify handler ``reload systemd conf`` (72). .. code-block:: yaml lp_systemd_conf: : owner: group: mode: reload_service: conf: - {section:
, key: