Debug
To display some facts (11-16) and values of the control variables, run select the task fp_debug and enable the debug output. By default all control variables are disabled. The example below shows values used in the examples of the Quick start guide
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 [12]
15 - ansible_distribution_version [12.1]
16 - ansible_distribution_release [12.1-RELEASE]
17 - ''
18 - rc_conf_hostname [test_14.example.com]
19 - fp_domain [example.com]
20 - aws [False]
21 - digitalocean [False]
22 - gcp [False]
23 - ''
24 - freebsd_install_method [packages]
25 - freebsd_use_packages [True]
26 - freebsd_install_retries [3]
27 - freebsd_install_delay [5]
28 - ''
29 - fp_install [False]
30 - fp_backup [False]
31 - fp_sanity [True] fp_sanity_tags_fatal [True]
32 - ''
33 - fp_aliases [True]
34 - fp_apcupsd [False] fp_apcupsd_install [False] fp_apcupsd_enabled [False]
35 - fp_authorized_key [True]
36 - fp_copy [True] fp_unarch_default [False] fp_unarch_optional [False]
37 - fp_cron [True]
38 - fp_devfs [False] fp_devfs_enabled [False]
39 - fp_fstab [True]
40 - fp_gitserver [False] fp_gitserver_install [False]
41 - fp_groups [True]
42 - fp_groupwrappers_install [True]
43 - fp_hostapd [False] fp_hostapd_install [False] fp_hostapd_enabled [False]
44 - fp_hostname [True]
45 - fp_linux [True] fp_linux_install [False] fp_linux_enable [True]
46 - fp_loader [True]
47 - fp_login [True]
48 - fp_make [True]
49 - fp_motd [True]
50 - fp_mount_img [False]
51 - fp_mount_iso [False]
52 - fp_nfs [True] fp_nfs_enable [True]
53 - fp_nfsd [True] fp_nfsd_enable [False]
54 - fp_ntp [True] fp_ntp_enable [True]
55 - fp_ntpdate [True]
56 - fp_passwords [True]
57 - fp_periodic [True]
58 - fp_procmail [True] fp_procmail_install [True]
59 - fp_resolvconf [False]
60 - fp_smartd [True] fp_smartd_install [True] fp_smartd_enabled [True]
61 - fp_snmpd [False] fp_snmpd_install [False] fp_snmpd_enabled [False]
62 - fp_ssh [True]
63 - fp_sshd [True] fp_sshd_enable [True]
64 - fp_sudoers [True]
65 - fp_swap [False] fp_swap_enable [False]
66 - fp_sysctl [True]
67 - fp_timezone [True]
68 - fp_tmpmfs [False]
69 - fp_users [True]
70 - fp_wpasuppliant [True] fp_wpasuppliant_install [True]
71 - ''
72 - fp_mountd_enable [True]
73 - fp_rpcbind_enable [True]
74 - fp_rpc_lockd_enable [True]
75 - fp_rpc_statd_enable [True]
76 ]
77}
78
79PLAY RECAP ***********************************************************************************
80test_14.example.com: ok=2 changed=0 unreachable=0 failed=0 skipped=21 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,
e.g. 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] **********************************************
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 ]
22}
23
24PLAY RECAP ***********************************************************************************
25test_14.example.com: ok=2 changed=0 unreachable=0 failed=0 skipped=21 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