Skip to content

Commit 46aab5e

Browse files
committed
update type docstrings
1 parent cce86d6 commit 46aab5e

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

templates/gitlab_application_settings_type.erb

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,37 @@ Puppet::ResourceApi.register_type(
77
docs: <<~EOS,
88
@summary Manage Gitlab settings
99

10-
@example Manage settings
11-
gitlab_settings { 'gitlab':
12-
signup_enabled => false,
13-
usage_ping_enabled => false,
14-
version_check_enabled => false,
15-
}
16-
1710
This resource type provides Puppet with the capabilities to manage Gitlab
1811
settings via REST API. The only allowed resource title is 'gitlab'. It'll
1912
throw an error if any other title is specified.
2013

21-
@note Changes to your application settings are subject to caching and might
22-
not immediately take effect. By default, GitLab caches application settings
23-
for 60 seconds.
14+
Gitlab API URL and token are required to use this type. There are two options:
15+
16+
1. Export those as GITLAB_BASE_URL and GITLAB_TOKEN environment variables.
17+
18+
2. Store those in a JSON file (see below) and export its location as
19+
GITLAB_PROVIDER_CONFIG_PATH environment variable.
20+
21+
If none of above is made, it'll try to load configuration from /etc/puppetlabs/gitlab_provider.json file.
22+
23+
If still no luck, it'll throw an exception.
24+
25+
Configuration file format is as follows:
26+
```json
27+
{
28+
"base_url": "http://gitlab.example.com/api/v4",
29+
"token": "<your_gitlab_token>"
30+
}
31+
```
32+
33+
@note Changes to the application settings are subject to caching (60s default).
34+
35+
@example Manage Gitlab settings
36+
gitlab_application_settings { 'gitlab':
37+
signup_enabled => false,
38+
usage_ping_enabled => false,
39+
version_check_enabled => false,
40+
}
2441

2542
@see https://docs.gitlab.com/api/settings/
2643
EOS

0 commit comments

Comments
 (0)