ansible-collections/community.postgresql

Create postgresql_domain module

開放

#706 建立於 2024年6月14日

 (17 則留言) (0 個反應) (0 位負責人)Python (116 個分叉)auto 404
enhancementhelp wanted

倉庫指標

星標
 (142 顆星)
PR 合併指標
 (平均合併 13天 5小時) (30 天內合併 3 個 PR)

描述

SUMMARY

This would be a new module to manage domains. Interface would be exactly analogous to postgresql.ext, postgresql.schema, or many others that manage create, drop and alter other major postgres objects

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

postgresql_domain

ADDITIONAL INFORMATION

There is currently no easy or obvious way to manage domains idempotently in ansible playbooks, the way there now is for tables, schemas, extensions, etc.

Domains are a puzzling exception to the wonderful way almost all other postgres objects can be managed in ansible. Without this, a developer will have to fall back on raw queries through the query module, and manage idempotence manually

    - name: Create a COUNT domain in the INVENTORY schema
      become_user: postgres
      community.postgresql.postgresql_domain:
        name: "COUNT"
        db: "WIDGET_INC"
        schema: "INVENTORY"
        base_type: "INT"
        check: "VALUE >= 0"
        default: 0
        cascade: false
        comment: "Domains are a great, underused tool for code readability and maintainability"
        state: present

貢獻者指南