Debug
To display some facts (11-17) and values of the control variables (34-78), select the task fp_debug and enable the debug output. By default, all control variables are disabled. Below is an example configuration of a typical VM for testing
1shell> ansible-playbook playbook.yml -t fp_debug -e fp_debug=true
2
3PLAY [test_14.example.com] *******************************************************************
4
5TASK [Gathering Facts] ***********************************************************************
6ok: [test_14.example.com]
7
8TASK [vbotka.freebsd_postinstall : FreeBSD postinstall Debug] ********************************
9ok: [test_14.example.com] =>
10 msg: |-
11 ansible_architecture: amd64
12 ansible_os_family: FreeBSD
13 ansible_distribution: FreeBSD
14 ansible_distribution_major_version: 13
15 ansible_distribution_version: 13.2
16 ansible_distribution_release: 13.2-RELEASE
17 ansible_python_version: 3.9.17
18
19 rc_conf_hostname: test_14.example.com
20 fp_domain: netng.org
21 aws: False
22 digitalocean: False
23 gcp: False
24
25 freebsd_install_method: packages
26 freebsd_use_packages: True
27 freebsd_install_retries: 3
28 freebsd_install_delay: 5
29
30 fp_install: True
31 fp_backup: True
32 fp_sanity: True fp_sanity_tags_fatal: True
33
34 fp_aliases: True
35 fp_apcupsd: False fp_apcupsd_install: False fp_apcupsd_enabled: False
36 fp_authorized_key: True
37 fp_copy: True fp_unarch_default: False fp_unarch_optional: False
38 fp_cron: True
39 fp_devfs: False fp_devfs_enabled: False
40 fp_dhclient: False
41 fp_freebsd_update: True
42 fp_fstab: True
43 fp_gitserver: False fp_gitserver_install: False
44 fp_groups: True
45 fp_groupwrappers: True fp_groupwrappers_install: True
46 fp_hostapd: False fp_hostapd_install: False fp_hostapd_enabled: False
47 fp_hostname: True
48 fp_hosts: True
49 fp_inetd: True fp_inetd_enabled: False
50 fp_libmap: False
51 fp_linux: False fp_linux_install: False fp_linux_enable: False
52 fp_loader: True fp_loader_warning: True
53 fp_login: True fp_login_conf_global: True
54 fp_make: True
55 fp_motd: True
56 fp_mount_img: False
57 fp_mount_iso: True
58 fp_nfs: True fp_nfs_enable: True
59 fp_nfsd: True fp_nfsd_enable: False
60 fp_ntp: True fp_ntp_enable: True
61 fp_ntpdate: True fp_ntpdate_enable: NO
62 fp_passwords: True
63 fp_periodic: True
64 fp_procmail: True fp_procmail_install: True
65 fp_qemu: False fp_qemu_enabled: False fp_qemu_install: False fp_qemu_user_static_install: False
66 fp_resolvconf: False
67 fp_smartd: False fp_smartd_install: False fp_smartd_enabled: False
68 fp_snmpd: False fp_snmpd_install: False fp_snmpd_enabled: False
69 fp_ssh: True
70 fp_sshd: True fp_sshd_enable: True
71 fp_sudoers: True
72 fp_swap: False fp_swap_enable: False
73 fp_sysctl: True
74 fp_syslogd: True fp_syslogd_enabled: True
75 fp_timezone: True
76 fp_tmpmfs: False
77 fp_users: True
78 fp_wpasuppliant: False fp_wpasuppliant_install: False
79
80 fp_mountd_enable: True
81 fp_rpcbind_enable: True
82 fp_rpc_lockd_enable: True
83 fp_rpc_statd_enable: True
84
85...
86
87PLAY RECAP ***********************************************************************************
88test_14.example.com: ok=2 changed=0 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0
Note
If you use the configuration from the Quick start guide enable ok hosts either by the
environment variable ANSIBLE_DISPLAY_OK_HOSTS=True
or in the configuration file
display_ok_hosts=true
.
Some tasks will display additional information when the variable
fp_*_debug is enabled. For example, see the configuration of
sshd below. Inspect the files in the tasks
directory whether
debug is available or not
1shell> ansible-playbook playbook.yml -t fp_sshd_debug -e fp_sshd_debug=true
2
3PLAY [test_14.example.com] *******************************************************************
4
5TASK [Gathering Facts] ***********************************************************************
6ok: [test_14.example.com]
7
8TASK [vbotka.freebsd_postinstall : sshd: Debug (fp_sshd_debug=true)] *************************
9ok: [test_14.example.com] =>
10 msg: |-
11 fp_sshd_bin: /usr/sbin/sshd
12 fp_sshd_conf_file: /etc/ssh/sshd_config
13 fp_sshd_conf:
14 - {key: PasswordAuthentication, value: 'no'}
15 - {key: ChallengeResponseAuthentication, value: 'no'}
16 - {key: PermitRootLogin, value: 'no'}
17 - {key: PermitTunnel, value: 'no'}
18 - {key: AllowTcpForwarding, value: 'yes'}
19 - {key: X11Forwarding, value: 'no'}
20 - {key: UseBlacklist, value: 'yes'}
21
22PLAY RECAP ***********************************************************************************
23test_14.example.com: ok=2 changed=0 unreachable=0 failed=0 skipped=3 rescued=0 ignored=0
Note
The debug output of this role is optimized for the default or yaml callback plugin. Set the plugin in the environment, e.g.
shell> export ANSIBLE_STDOUT_CALLBACK=default
or in the configuration filestdout_callback = default
.See the details about the yaml callback plugin
shell> ansible-doc -t callback yaml
See the list of other callback plugins
shell> ansible-doc -t callback -l