ansible.builtin.jsonfile – JSON formatted files.

Note

This cache plugin is part of ansible-core and included in all Ansible installations. In most cases, you can use the short plugin name jsonfile even without specifying the collections: keyword. However, we recommend you use the FQCN for easy linking to the plugin documentation and to avoid conflicting with other collections that may have the same cache plugin name.

New in version 1.9: of ansible.builtin

Synopsis

  • This cache uses JSON formatted, per host, files saved to the filesystem.

Parameters

Parameter

Comments

_prefix

string

User defined prefix to use when creating the JSON files

Configuration:

  • INI entry:

    [defaults]
    fact_caching_prefix = None
    
  • Environment variable: ANSIBLE_CACHE_PLUGIN_PREFIX

_timeout

integer

Expiration timeout for the cache plugin data

Default: 86400

Configuration:

  • INI entry:

    [defaults]
    fact_caching_timeout = 86400
    
  • Environment variable: ANSIBLE_CACHE_PLUGIN_TIMEOUT

_uri

path / required

Path in which the cache plugin will save the JSON files

Configuration:

  • INI entry:

    [defaults]
    fact_caching_connection = None
    
  • Environment variable: ANSIBLE_CACHE_PLUGIN_CONNECTION

Authors

  • Ansible Core (@ansible-core)