mirror of
				https://github.com/ansible-collections/community.general.git
				synced 2025-10-25 05:23:58 -07:00 
			
		
		
		
	[PR #8628/cac55beb backport][stable-9] Type options of callback plugins (#8663)
Type options of callback plugins (#8628)
Type options of callback plugins.
(cherry picked from commit cac55beb4f)
Co-authored-by: Felix Fontein <felix@fontein.de>
	
	
This commit is contained in:
		
					parent
					
						
							
								2261bd62de
							
						
					
				
			
			
				commit
				
					
						a89ca23ecc
					
				
			
		
					 12 changed files with 35 additions and 0 deletions
				
			
		
							
								
								
									
										2
									
								
								changelogs/fragments/8628-callback-types.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								changelogs/fragments/8628-callback-types.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,2 @@ | |||
| minor_changes: | ||||
|   - "cgroup_memory_recap, hipchat, jabber, log_plays, loganalytics, logentries, logstash, slack, splunk, sumologic, syslog_json callback plugins - make sure that all options are typed (https://github.com/ansible-collections/community.general/pull/8628)." | ||||
|  | @ -25,6 +25,7 @@ DOCUMENTATION = ''' | |||
|       max_mem_file: | ||||
|         required: true | ||||
|         description: Path to cgroups C(memory.max_usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.max_usage_in_bytes). | ||||
|         type: str | ||||
|         env: | ||||
|           - name: CGROUP_MAX_MEM_FILE | ||||
|         ini: | ||||
|  | @ -33,6 +34,7 @@ DOCUMENTATION = ''' | |||
|       cur_mem_file: | ||||
|         required: true | ||||
|         description: Path to C(memory.usage_in_bytes) file. Example V(/sys/fs/cgroup/memory/ansible_profile/memory.usage_in_bytes). | ||||
|         type: str | ||||
|         env: | ||||
|           - name: CGROUP_CUR_MEM_FILE | ||||
|         ini: | ||||
|  |  | |||
|  | @ -25,6 +25,7 @@ DOCUMENTATION = ''' | |||
|     options: | ||||
|       token: | ||||
|         description: HipChat API token for v1 or v2 API. | ||||
|         type: str | ||||
|         required: true | ||||
|         env: | ||||
|           - name: HIPCHAT_TOKEN | ||||
|  | @ -33,6 +34,10 @@ DOCUMENTATION = ''' | |||
|             key: token | ||||
|       api_version: | ||||
|         description: HipChat API version, v1 or v2. | ||||
|         type: str | ||||
|         choices: | ||||
|           - v1 | ||||
|           - v2 | ||||
|         required: false | ||||
|         default: v1 | ||||
|         env: | ||||
|  | @ -42,6 +47,7 @@ DOCUMENTATION = ''' | |||
|             key: api_version | ||||
|       room: | ||||
|         description: HipChat room to post in. | ||||
|         type: str | ||||
|         default: ansible | ||||
|         env: | ||||
|           - name: HIPCHAT_ROOM | ||||
|  | @ -50,6 +56,7 @@ DOCUMENTATION = ''' | |||
|             key: room | ||||
|       from: | ||||
|         description:  Name to post as | ||||
|         type: str | ||||
|         default: ansible | ||||
|         env: | ||||
|           - name: HIPCHAT_FROM | ||||
|  |  | |||
|  | @ -20,21 +20,25 @@ DOCUMENTATION = ''' | |||
|     options: | ||||
|       server: | ||||
|         description: connection info to jabber server | ||||
|         type: str | ||||
|         required: true | ||||
|         env: | ||||
|           - name: JABBER_SERV | ||||
|       user: | ||||
|         description: Jabber user to authenticate as | ||||
|         type: str | ||||
|         required: true | ||||
|         env: | ||||
|           - name: JABBER_USER | ||||
|       password: | ||||
|         description: Password for the user to the jabber server | ||||
|         type: str | ||||
|         required: true | ||||
|         env: | ||||
|           - name: JABBER_PASS | ||||
|       to: | ||||
|         description: chat identifier that will receive the message | ||||
|         type: str | ||||
|         required: true | ||||
|         env: | ||||
|           - name: JABBER_TO | ||||
|  |  | |||
|  | @ -21,6 +21,7 @@ DOCUMENTATION = ''' | |||
|       log_folder: | ||||
|         default: /var/log/ansible/hosts | ||||
|         description: The folder where log files will be created. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: ANSIBLE_LOG_FOLDER | ||||
|         ini: | ||||
|  |  | |||
|  | @ -21,6 +21,7 @@ DOCUMENTATION = ''' | |||
|     options: | ||||
|       workspace_id: | ||||
|         description: Workspace ID of the Azure log analytics workspace. | ||||
|         type: str | ||||
|         required: true | ||||
|         env: | ||||
|           - name: WORKSPACE_ID | ||||
|  | @ -29,6 +30,7 @@ DOCUMENTATION = ''' | |||
|             key: workspace_id | ||||
|       shared_key: | ||||
|         description: Shared key to connect to Azure log analytics workspace. | ||||
|         type: str | ||||
|         required: true | ||||
|         env: | ||||
|           - name: WORKSPACE_SHARED_KEY | ||||
|  |  | |||
|  | @ -22,6 +22,7 @@ DOCUMENTATION = ''' | |||
|     options: | ||||
|       api: | ||||
|         description: URI to the Logentries API. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: LOGENTRIES_API | ||||
|         default: data.logentries.com | ||||
|  | @ -30,6 +31,7 @@ DOCUMENTATION = ''' | |||
|             key: api | ||||
|       port: | ||||
|         description: HTTP port to use when connecting to the API. | ||||
|         type: int | ||||
|         env: | ||||
|             - name: LOGENTRIES_PORT | ||||
|         default: 80 | ||||
|  | @ -38,6 +40,7 @@ DOCUMENTATION = ''' | |||
|             key: port | ||||
|       tls_port: | ||||
|         description: Port to use when connecting to the API when TLS is enabled. | ||||
|         type: int | ||||
|         env: | ||||
|             - name: LOGENTRIES_TLS_PORT | ||||
|         default: 443 | ||||
|  | @ -46,6 +49,7 @@ DOCUMENTATION = ''' | |||
|             key: tls_port | ||||
|       token: | ||||
|         description: The logentries C(TCP token). | ||||
|         type: str | ||||
|         env: | ||||
|           - name: LOGENTRIES_ANSIBLE_TOKEN | ||||
|         required: true | ||||
|  |  | |||
|  | @ -20,6 +20,7 @@ DOCUMENTATION = r''' | |||
|     options: | ||||
|       server: | ||||
|         description: Address of the Logstash server. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: LOGSTASH_SERVER | ||||
|         ini: | ||||
|  | @ -29,6 +30,7 @@ DOCUMENTATION = r''' | |||
|         default: localhost | ||||
|       port: | ||||
|         description: Port on which logstash is listening. | ||||
|         type: int | ||||
|         env: | ||||
|             - name: LOGSTASH_PORT | ||||
|         ini: | ||||
|  | @ -38,6 +40,7 @@ DOCUMENTATION = r''' | |||
|         default: 5000 | ||||
|       type: | ||||
|         description: Message type. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: LOGSTASH_TYPE | ||||
|         ini: | ||||
|  | @ -47,6 +50,7 @@ DOCUMENTATION = r''' | |||
|         default: ansible | ||||
|       pre_command: | ||||
|         description: Executes command before run and its result is added to the C(ansible_pre_command_output) logstash field. | ||||
|         type: str | ||||
|         version_added: 2.0.0 | ||||
|         ini: | ||||
|           - section: callback_logstash | ||||
|  |  | |||
|  | @ -22,6 +22,7 @@ DOCUMENTATION = ''' | |||
|       webhook_url: | ||||
|         required: true | ||||
|         description: Slack Webhook URL. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: SLACK_WEBHOOK_URL | ||||
|         ini: | ||||
|  | @ -30,6 +31,7 @@ DOCUMENTATION = ''' | |||
|       channel: | ||||
|         default: "#ansible" | ||||
|         description: Slack room to post in. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: SLACK_CHANNEL | ||||
|         ini: | ||||
|  | @ -37,6 +39,7 @@ DOCUMENTATION = ''' | |||
|             key: channel | ||||
|       username: | ||||
|         description: Username to post as. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: SLACK_USERNAME | ||||
|         default: ansible | ||||
|  |  | |||
|  | @ -22,6 +22,7 @@ DOCUMENTATION = ''' | |||
|     options: | ||||
|       url: | ||||
|         description: URL to the Splunk HTTP collector source. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: SPLUNK_URL | ||||
|         ini: | ||||
|  | @ -29,6 +30,7 @@ DOCUMENTATION = ''' | |||
|             key: url | ||||
|       authtoken: | ||||
|         description: Token to authenticate the connection to the Splunk HTTP collector. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: SPLUNK_AUTHTOKEN | ||||
|         ini: | ||||
|  |  | |||
|  | @ -20,6 +20,7 @@ requirements: | |||
| options: | ||||
|   url: | ||||
|     description: URL to the Sumologic HTTP collector source. | ||||
|     type: str | ||||
|     env: | ||||
|       - name: SUMOLOGIC_URL | ||||
|     ini: | ||||
|  |  | |||
|  | @ -19,6 +19,7 @@ DOCUMENTATION = ''' | |||
|     options: | ||||
|       server: | ||||
|         description: Syslog server that will receive the event. | ||||
|         type: str | ||||
|         env: | ||||
|         - name: SYSLOG_SERVER | ||||
|         default: localhost | ||||
|  | @ -27,6 +28,7 @@ DOCUMENTATION = ''' | |||
|             key: syslog_server | ||||
|       port: | ||||
|         description: Port on which the syslog server is listening. | ||||
|         type: int | ||||
|         env: | ||||
|           - name: SYSLOG_PORT | ||||
|         default: 514 | ||||
|  | @ -35,6 +37,7 @@ DOCUMENTATION = ''' | |||
|             key: syslog_port | ||||
|       facility: | ||||
|         description: Syslog facility to log as. | ||||
|         type: str | ||||
|         env: | ||||
|           - name: SYSLOG_FACILITY | ||||
|         default: user | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue