herve4m / herve4m.quay / 1.2.0 / module / quay_organization Manage Quay Container Registry organizations | "added in version" 0.0.1 of herve4m.quay" Authors: Herve Quatremain (@herve4m)herve4m.quay.quay_organization (1.2.0) — module
Install with ansible-galaxy collection install herve4m.quay:==1.2.0
collections: - name: herve4m.quay version: 1.2.0
Create, delete, and update organizations in Quay Container Registry.
- name: Ensure the organization exists herve4m.quay.quay_organization: name: production email: prodlist@example.com time_machine_expiration: "7d" auto_prune_method: tags auto_prune_value: 20 state: present quay_host: https://quay.example.com quay_token: vgfH9zH5q6eV16Con7SvDQYSr0KPYQimMHVehZv7
# Renaming requires superuser permissions - name: Ensure the organization has a new name herve4m.quay.quay_organization: name: production new_name: development quay_host: https://quay.example.com quay_token: vgfH9zH5q6eV16Con7SvDQYSr0KPYQimMHVehZv7
- name: Ensure the organization is removed herve4m.quay.quay_organization: name: development state: absent quay_host: https://quay.example.com quay_token: vgfH9zH5q6eV16Con7SvDQYSr0KPYQimMHVehZv7
name: description: - Name of the organization to create, remove, or modify. - The name must be in lowercase and must not contain white spaces. For compatibility with earlier versions of Docker, the name must be at least four characters long. required: true type: str email: description: - Email address to associate with the new organization. - If your Quay administrator has enabled the mailing capability of your Quay installation (C(FEATURE_MAILING) to C(true) in C(config.yaml)), then this I(email) parameter is mandatory. - You cannot use the same address as your account email. type: str state: choices: - absent - present default: present description: - If C(absent), then the module deletes the organization. - The module does not fail if the organization does not exist, because the state is already as expected. - If C(present), then the module creates the organization if it does not already exist. - If the organization already exists, then the module updates its state. type: str new_name: description: - New name for the organization. - Setting this option changes the name of the organization which current name is provided in I(name). - The token you use to connect to the API (in I(quay_token)) must have the "Super User Access" permission. type: str quay_host: default: http://127.0.0.1 description: - URL for accessing the API. U(https://quay.example.com:8443) for example. - If you do not set the parameter, then the module uses the C(QUAY_HOST) environment variable. - If you do no set the environment variable either, then the module uses the U(http://127.0.0.1) URL. type: str quay_token: description: - OAuth access token for authenticating against the API. - If you do not set the parameter, then the module tries the C(QUAY_TOKEN) environment variable. - Mutually exclusive with I(quay_username) and I(quay_password). type: str quay_password: description: - The password to use for authenticating against the API. - If you do not set the parameter, then the module tries the C(QUAY_PASSWORD) environment variable. - If you set I(quay_password), then you also need to set I(quay_username). - Mutually exclusive with I(quay_token). type: str quay_username: description: - The username to use for authenticating against the API. - If you do not set the parameter, then the module tries the C(QUAY_USERNAME) environment variable. - If you set I(quay_username), then you also need to set I(quay_password). - Mutually exclusive with I(quay_token). type: str validate_certs: aliases: - verify_ssl default: true description: - Whether to allow insecure connections to the API. - If C(no), then the module does not validate SSL certificates. - If you do not set the parameter, then the module tries the C(QUAY_VERIFY_SSL) environment variable (C(yes), C(1), and C(True) mean yes, and C(no), C(0), C(False), and no value mean no). type: bool auto_prune_value: description: - Number of tags to keep when I(auto_prune_value) is C(tags). The value must be 1 or more. - Period of time when I(auto_prune_value) is C(date). The value must be 1 or more, and must be followed by a suffix; s (for second), m (for minute), h (for hour), d (for day), or w (for week). - I(auto_prune_method) is required when I(auto_prune_value) is set. type: str auto_prune_method: choices: - none - tags - date description: - Method to use for the auto-pruning tags policy. - If C(none), then the module ensures that no policy is in place. The tags are not pruned. - If C(tags), then the policy keeps only the number of tags that you specify in I(auto_prune_value). - If C(date), then the policy deletes the tags older than the time period that you specify in I(auto_prune_value). - I(auto_prune_value) is required when I(auto_prune_method) is C(tags) or C(date). type: str time_machine_expiration: choices: - 0s - 1d - 7d - 14d - 1month description: - The amount of time, after a tag is deleted, that the tag is accessible in time machine before being garbage collected. type: str