When debugging, it can be useful to view the Ansible logs with greater verbosity than
the default. Valid verbosity levels are the integers
0
(the default) through 4
, with higher numbers indicating increased verbosity.
These translate into the number of -v
arguments passed into the ansible-playbook
command when the playbooks are executed.
Verbosity | Argument |
---|---|
0 |
|
1 |
-v |
2 |
-vv |
3 |
-vvv |
4 |
-vvvv |
The Ansible verbosity is determined at the time that the CFS session starts. The verbosity is applied to all configuration layers in the session. The verbosity is set to the first one of the following things that successfully specifies a verbosity level.
0
.For more information on Ansible configurations, see
Set the ansible.cfg
for a Session.
When increasing Ansible verbosity, be aware that it can produce a lot of output, and in some cases can even cause problems.
3
or 4
with sessions that target a large numbers
of hosts. Avoid this by setting an Ansible limit, reducing the number of targets.
4
can cause CFS sessions to hang. There
are multiple ways to avoid this issue:
3
or lower.display_ok_hosts
and display_skipped_hosts
settings in the
Ansible configuration that the session is using. For more details, see
Set the ansible.cfg
for a Session.When creating a CFS session using the API or CLI, there are several different parameters that may be specified. The following table shows the appropriate argument or field to use in order to specify the Ansible configuration, limit, or verbosity.
If no Ansible configuration is directly specified, the session will use the default Ansible configuration.
Parameter | CLI | API |
---|---|---|
Ansible configuration | --ansible-config |
ansibleConfig |
Ansible limit | --ansible-limit |
ansibleLimit |
Ansible verbosity | --ansible-verbosity |
ansibleVerbosity |
Not all CFS sessions are created directly by an administrator. For example:
In these cases, an administrator is not able to directly specify these parameters using the
method described in the previous section. However, these sessions will run using the
default Ansible configuration. Any parameters specified in this Ansible
configuration will be used in these automatic or indirectly-created CFS sessions.
In particular, this is where an administrator is able to specify an Ansible verbosity
level for these sessions. For more details, see Set the ansible.cfg
for a Session.