Ë
    ÇVhP  ã                   ó\   — d dl mZmZmZ eZdZdZd dlm	Z	 d dl
mZ d„ Zedk(  r e«        yy)	é    )Úabsolute_importÚdivisionÚprint_functionaB  
module: airbrake_deployment
author:
  - "Bruce Pennypacker (@bpennypacker)"
  - "Patrick Humpal (@phumpal)"
short_description: Notify airbrake about app deployments
description:
  - Notify airbrake about app deployments (see U(https://airbrake.io/docs/api/#deploys-v4)).
extends_documentation_fragment:
  - community.general.attributes
attributes:
  check_mode:
    support: full
  diff_mode:
    support: none
options:
  project_id:
    description:
      - Airbrake PROJECT_ID.
    required: true
    type: str
    version_added: '0.2.0'
  project_key:
    description:
      - Airbrake PROJECT_KEY.
    required: true
    type: str
    version_added: '0.2.0'
  environment:
    description:
      - The airbrake environment name, typically v(production), V(staging), and so on.
    required: true
    type: str
  user:
    description:
      - The username of the person doing the deployment.
    required: false
    type: str
  repo:
    description:
      - URL of the project repository.
    required: false
    type: str
  revision:
    description:
      - A hash, number, tag, or other identifier showing what revision from version control was deployed.
    required: false
    type: str
  version:
    description:
      - A string identifying what version was deployed.
    required: false
    type: str
    version_added: '1.0.0'
  url:
    description:
      - Optional URL to submit the notification to. Use to send notifications to Airbrake-compliant tools like Errbit.
    required: false
    default: "https://api.airbrake.io/api/v4/projects/"
    type: str
  validate_certs:
    description:
      - If V(false), SSL certificates for the target URL will not be validated. This should only be used on personally controlled
        sites using self-signed certificates.
    required: false
    default: true
    type: bool

requirements: []
aì  
- name: Notify airbrake about an app deployment
  community.general.airbrake_deployment:
    project_id: '12345'
    project_key: 'AAAAAA'
    environment: staging
    user: ansible
    revision: '4.2'

- name: Notify airbrake about an app deployment, using git hash as revision
  community.general.airbrake_deployment:
    project_id: '12345'
    project_key: 'AAAAAA'
    environment: staging
    user: ansible
    revision: 'e54dd3a01f2c421b558ef33b5f79db936e2dcf15'
    version: '0.2.0'
)ÚAnsibleModule)Ú	fetch_urlc                  óÞ  — t        t        t        ddd¬«      t        ddd¬«      t        dd¬«      t        dd¬«      t        dd¬«      t        dd¬«      t        dd¬«      t        ddd¬«      t        dd¬	«      ¬
«	      d¬«      } i }| j                  r| j                  d¬«       | j                  d   r| j                  d   |d<   | j                  d   r| j                  d   |d<   | j                  d   r| j                  d   |d<   | j                  d   r| j                  d   |d<   | j                  d   r| j                  d   |d<   | j                  j                  d«      | j                  d   z   dz   | j                  d   z   }| j                  |«      }ddi}t        | |||d¬«      \  }}|d   dk(  s|d   dk(  r| j                  d¬«       y | j                  d|d   |fz  ¬ «       y )!NTÚstr)ÚrequiredÚno_logÚtype)r
   r   Fz(https://api.airbrake.io/api/v4/projects/)r
   Údefaultr   Úbool)r   r   )	Ú
project_idÚproject_keyÚenvironmentÚuserÚrepoÚrevisionÚversionÚurlÚvalidate_certs)Úargument_specÚsupports_check_mode)Úchangedr   r   Úusernamer   Ú
repositoryr   r   r   r   z/deploys?key=r   zContent-Typezapplication/jsonÚPOST)ÚdataÚheadersÚmethodÚstatuséÈ   éÉ   z%HTTP result code: %d connecting to %s)Úmsg)	r   ÚdictÚ
check_modeÚ	exit_jsonÚparamsÚgetÚjsonifyr   Ú	fail_json)Úmoduler(   r   Ú	json_bodyr   ÚresponseÚinfos          úy/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/general/plugins/modules/airbrake_deployment.pyÚmainr1   n   s÷  € äÜÜ T°$¸UÔCÜ d°4¸eÔDÜ d°Ô7Ü˜u¨5Ô1Ü˜u¨5Ô1Ü 5¨uÔ5Ü %¨eÔ4Ü˜eÐ-WÐ^cÔdÜ¨°6Ô:ô

ð !ô€Fð  €Fð ×ÒØ×Ñ ÐÔ&ð ‡}}]Ò#Ø &§¡¨mÑ <ˆˆ}Ñà‡}}VÒØ#Ÿ]™]¨6Ñ2ˆˆzÑà‡}}VÒØ%Ÿ}™}¨VÑ4ˆˆ|Ñà‡}}ZÒ Ø#Ÿ]™]¨:Ñ6ˆˆzÑà‡}}YÒØ"ŸM™M¨)Ñ4ˆˆyÑð -‰-×
Ñ
˜EÓ
" V§]¡]°<Ñ%@Ñ
@À?Ñ
RÐU[×UbÑUbÐcpÑUqÑ
q€CØ—‘˜vÓ&€Ið Ð1Ð2€Gô ˜v s°Ø'.°vô?N€Hˆdð ˆH~˜Ò  X¡°#Ò 5Ø×Ñ ÐÕ&à×ÑÐDÈÈXÉÐX[ÐG\Ñ\ÐÕ]ó    Ú__main__N)Ú
__future__r   r   r   r   Ú__metaclass__ÚDOCUMENTATIONÚEXAMPLESÚansible.module_utils.basicr   Úansible.module_utils.urlsr   r1   Ú__name__© r2   r0   ú<module>r<      sF   ð÷ AÑ @Ø€ðE€ðN€õ& 5Ý /ò6^ðr ˆzÒÙ…Fð r2   