-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: swap config.yaml reference to RST
- Loading branch information
Showing
2 changed files
with
66 additions
and
80 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.. _file-config-yaml: | ||
.. highlight:: yaml | ||
|
||
``config.yaml`` | ||
*************** | ||
|
||
.. important:: | ||
Starting with Charmcraft 2.5, this file is created automatically from information | ||
you provide in :ref:`charmcraft.yaml<file-charmcraft-yaml>`. For backwards | ||
compatibility, Charmcraft will continue to allow the use of this file, but you may | ||
not duplicate keys across the two files. | ||
|
||
The ``config.yaml`` in a charm's root directory is an optional file that may be used to define the configuration options supported by a charm. | ||
|
||
The definitions are collected under a single YAML map called ``options``. The rest of this doc gives details about this map. | ||
|
||
``options`` | ||
=========== | ||
|
||
**Status:** Required if the file exists. | ||
|
||
**Purpose:** The ``options`` key allows charm authors to declare the configuration options that they have defined for a charm. | ||
|
||
**Structure:** The key contains a definition block for each option, where each definition consists of a charm-author-defined option name and an option description, given in 3 fields -- type, description, and default value: | ||
|
||
.. code:: | ||
options: | ||
<option name>: | ||
default: <default value> | ||
description: <description> | ||
type: <type> | ||
<option name>: | ||
default: <default value> | ||
description: <description> | ||
type: <type> | ||
... | ||
In some cases, it may be awkward or impossible to provide a sensible default. In these cases, ensure that it is noted in the description of the configuration option. It is acceptable to provide ``null`` configuration defaults or omit the ``default`` field. | ||
|
||
|
||
.. dropdown:: Example | ||
|
||
.. code:: | ||
options: | ||
name: | ||
default: Wiki | ||
description: The name, or Title of the Wiki | ||
type: string | ||
skin: | ||
default: vector | ||
description: skin for the Wiki | ||
type: string | ||
logo: | ||
default: | ||
description: URL to fetch logo from | ||
type: string | ||
admins: | ||
default: | ||
description: Comma-separated list of admin users to create: user:pass[,user:pass]+ | ||
type: string | ||
debug: | ||
default: false | ||
type: boolean | ||
description: turn on debugging features of mediawiki |