From 21fcaf0738c0abbb254f859009ae10af0fdbd8ea Mon Sep 17 00:00:00 2001 From: Yanis Guenane Date: Tue, 7 Aug 2018 09:57:34 +0200 Subject: [PATCH] scaleway: Add common documentation fragment Every scaleway modules will require the same base of parameters. Instead of documenting it each and every time, we build a doc fragment that will allow one to simply extend documentation for every new module. extends_documentation_fragment: scaleway --- .../utils/module_docs_fragments/scaleway.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/ansible/utils/module_docs_fragments/scaleway.py diff --git a/lib/ansible/utils/module_docs_fragments/scaleway.py b/lib/ansible/utils/module_docs_fragments/scaleway.py new file mode 100644 index 00000000000..bc34cc19274 --- /dev/null +++ b/lib/ansible/utils/module_docs_fragments/scaleway.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2018 Yanis Guenane +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + +class ModuleDocFragment(object): + + # Standard documentation fragment + DOCUMENTATION = ''' +options: + oauth_token: + description: + - Scaleway OAuth token. + aliases: ['api_token'] + timeout: + description: + - HTTP timeout to Scaleway API in seconds. + default: 30 + validate_certs: + description: + - Validate SSL certs of the Scaleway API. + default: yes + type: bool +notes: + - Also see the API documentation on U(https://developer.scaleway.com/) + - If parameters are not set within the module, the following + environment variables can be used in decreasing order of precedence + C(SCW_TOKEN), C(SCW_API_KEY) or C(SCW_OAUTH_TOKEN). +'''