Skip to content

Commit d699656

Browse files
committed
updates for icinga doc
1 parent f594eda commit d699656

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+999
-584
lines changed

hooks/doc

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. hooks/molecule.rc
44

5-
set -x
5+
# set -x
66

77
if [ -z "${COLLECTION_DIR}" ]
88
then
@@ -17,7 +17,7 @@ then
1717
# ansible-doc --list --list_files -t module ${COLLECTION_NAMESPACE}.${COLLECTION_NAME}
1818

1919
ansible_modules=$(
20-
ansible-doc --list ${COLLECTION_NAMESPACE}.${COLLECTION_NAME} --json | jq -r 'keys[]'
20+
ansible-doc --list ${COLLECTION_NAMESPACE}.${COLLECTION_NAME} --type module --json | jq -r 'keys[]'
2121
)
2222

2323
for i in ${ansible_modules}
@@ -26,6 +26,19 @@ then
2626
PAGER='cat' ansible-doc --type module ${i}
2727
echo ""
2828
done
29+
30+
# -------------------------------------------------
31+
ansible_filter=$(
32+
ansible-doc --list ${COLLECTION_NAMESPACE}.${COLLECTION_NAME} --type filter --json | jq -r 'keys[]'
33+
)
34+
35+
# for i in ${ansible_filter}
36+
# do
37+
# # echo " - ${i}"
38+
# PAGER='cat' ansible-doc --type filter ${i}
39+
# echo ""
40+
# done
41+
2942
fi
3043

3144
exit 0

hooks/install

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ rsync \
1111
--verbose \
1212
--recursive \
1313
--exclude hooks \
14+
--exclude *OBSOLETE* \
15+
--exclude *obsolete* \
1416
--exclude __pycache__ \
1517
--delete \
18+
--delete-excluded \
1619
../ansible-collection-${COLLECTION_NAME}/* \
1720
"${COLLECTION_DIR}/"

plugins/filter/append_checksum.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
DOCUMENTATION:
3+
name: append_checksum
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: create a list from list
7+
description:
8+
- create a list from list.
9+
positional: _input
10+
options:
11+
_input:
12+
description: a dictionary with some icingaweb modules or themes.
13+
type: dict
14+
required: true
15+
checksums:
16+
description: A dictionary mit checksums.
17+
type: dict
18+
required: true
19+
notes:
20+
21+
EXAMPLES: |
22+
icingaweb_modules: "{{ icingaweb_modules | bodsch.icinga.append_checksum(_module_checksum) }}"
23+
24+
icingaweb_themes: "{{ icingaweb_themes | bodsch.icinga.append_checksum(_theme_checksum) }}"
25+
26+
RETURN:
27+
_value:
28+
description: The original dictionary, in which each entry was extended with a checksum for the corresponding archive.
29+
type: dict
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
DOCUMENTATION:
3+
name: apply_notification
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: TBD
7+
description:
8+
- TBD
9+
positional: _input
10+
options:
11+
_input:
12+
description: A directories of ...
13+
type: dict
14+
required: true
15+
name:
16+
description: TBD.
17+
type: string
18+
required: true
19+
notes:
20+
21+
EXAMPLES: |
22+
data, _type, valid_data = icinga2_notification_apply_rules | bodsch.icinga.apply_notification(n)
23+
24+
RETURN:
25+
_value:
26+
description: TBD
27+
type: tuple
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
DOCUMENTATION:
3+
name: apply_service_name
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: TBD
7+
description:
8+
- TBD
9+
positional: _input
10+
options:
11+
_input:
12+
description: A directories of ...
13+
type: dict
14+
required: true
15+
default:
16+
description: TBD.
17+
type: string
18+
required: true
19+
notes:
20+
21+
EXAMPLES: |
22+
v, _name = v | bodsch.icinga.apply_service_name(c)
23+
24+
RETURN:
25+
_value:
26+
description: TBD
27+
type: tuple

plugins/filter/database_schema.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
DOCUMENTATION:
3+
name: database_schema
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: Defines a database schema file to be imported.
7+
description:
8+
- Defines a database schema file to be imported.
9+
positional: _input
10+
options:
11+
_input:
12+
description: A dictionary with found files.
13+
type: dict
14+
required: true
15+
database_type:
16+
description: A string with database types to be searched for in the dictionary. The default is ‘mysql’
17+
type: string
18+
required: false
19+
notes:
20+
21+
EXAMPLES: |
22+
icingadb_database_schema: "{{ found_schema | bodsch.icinga.database_schema('mysql') | first }}"
23+
24+
RETURN:
25+
_value:
26+
description: A list of the files found.
27+
type: list
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
DOCUMENTATION:
3+
name: database_upgrade_directory
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: Defines a directory from which update files are to be obtained.
7+
description:
8+
- Defines a directory from which update files are to be obtained.
9+
positional: _input
10+
options:
11+
_input:
12+
description: A dictionary with found directories.
13+
type: dict
14+
required: true
15+
database_type:
16+
description: A string with database types to be searched for in the dictionary. The default is ‘mysql’
17+
type: string
18+
required: false
19+
notes:
20+
21+
EXAMPLES: |
22+
icingadb_upgrade_directory: "{{ found_directory | bodsch.icinga.database_upgrade_directory('mysql')}}"
23+
24+
RETURN:
25+
_value:
26+
description: A string with the found directories.
27+
type: string

plugins/filter/dict_from_list.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
DOCUMENTATION:
3+
name: dict_from_list
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: create a dictionary from list
7+
description:
8+
- create a dictionary from list.
9+
positional: _input
10+
options:
11+
_input:
12+
description: A list of elements.
13+
type: list
14+
required: true
15+
search:
16+
description: An string to search entries in (c(_input)) list.
17+
type: string
18+
required: true
19+
notes:
20+
21+
EXAMPLES: |
22+
_icingaweb_module_grafana: "{{ icingaweb_modules | bodsch.icinga.dict_from_list('grafana') }}"
23+
24+
RETURN:
25+
_value:
26+
description: The element you are looking for as a dictionary.
27+
type: dict
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
DOCUMENTATION:
3+
name: dns_icinga_primary
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: TBD
7+
description:
8+
- TBD
9+
positional: _input
10+
options:
11+
_input:
12+
description: A directories of ...
13+
type: dict
14+
required: true
15+
object_name:
16+
description: TBD.
17+
type: bool
18+
required: true
19+
object_data:
20+
description: TBD.
21+
type: string
22+
required: true
23+
alternatives:
24+
description: TBD.
25+
type: list
26+
required: true
27+
notes:
28+
29+
EXAMPLES: |
30+
address = icinga2_masters | bodsch.icinga.dns_icinga_primary(object_name=key, object_data=values, alternatives=[key, ansible_fqdn])
31+
32+
RETURN:
33+
_value:
34+
description: TBD
35+
type: string
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
DOCUMENTATION:
3+
name: dns_icinga_satellite
4+
author: Bodo Schulz (@bodsch)
5+
version_added: 1.0.0
6+
short_description: TBD
7+
description:
8+
- TBD
9+
positional: _input
10+
options:
11+
_input:
12+
description: A directories of ...
13+
type: dict
14+
required: true
15+
object_name:
16+
description: TBD.
17+
type: bool
18+
required: true
19+
object_data:
20+
description: TBD.
21+
type: string
22+
required: true
23+
satellite_zone:
24+
description: TBD.
25+
type: dict
26+
required: true
27+
alternatives:
28+
description: TBD.
29+
type: list
30+
required: true
31+
notes:
32+
33+
EXAMPLES: |
34+
address = icinga2_masters | bodsch.icinga.dns_icinga_satellite(object_name=key, object_data=values, satellite_zone=icinga2_satellite_zone, alternatives=[key, ansible_fqdn])
35+
36+
RETURN:
37+
_value:
38+
description: TBD
39+
type: string

0 commit comments

Comments
 (0)