community.general.pagerduty_user – Manage a user account on PagerDuty

From Get docs
Ansible/docs/2.11/collections/community/general/pagerduty user module


community.general.pagerduty_user – Manage a user account on PagerDuty

Note

This plugin is part of the community.general collection (version 2.0.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.pagerduty_user.


New in version 1.3.0: of community.general


Synopsis

  • This module manages the creation/removal of a user account on PagerDuty.

Requirements

The below requirements are needed on the host that executes this module.

  • pdpyras python module = 4.1.1
  • PagerDuty API Access

Parameters

Parameter Choices/Defaults Comments

access_token

string / required

An API access token to authenticate with the PagerDuty REST API.

pd_email

string / required

The user's email address.

pd_email is the unique identifier used and cannot be updated using this module.

pd_role

string

  • global_admin
  • manager
  • responder

  • observer
  • stakeholder
  • limited_stakeholder
  • restricted_access

The user's role.

pd_teams

list / elements=string

The teams to which the user belongs.

Required if state=present.

pd_user

string / required

Name of the user in PagerDuty.

state

string

  • present

  • absent

State of the user.

On present, it creates a user if the user doesn't exist.

On absent, it removes a user if the account exists.



Notes

Note

  • Supports check_mode.


Examples

- name: Create a user account on PagerDuty
  community.general.pagerduty_user:
    access_token: 'Your_Access_token'
    pd_user: user_full_name
    pd_email: user_email
    pd_role: user_pd_role
    pd_teams: user_pd_teams
    state: "present"

- name: Remove a user account from PagerDuty
  community.general.pagerduty_user:
    access_token: 'Your_Access_token'
    pd_user: user_full_name
    pd_email: user_email
    state: "absent"

Authors

  • Zainab Alsaffar (@zanssa)

© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.11/collections/community/general/pagerduty_user_module.html