Github User State Module
New in version 2016.3.0.
This state is used to ensure presence of users in the Organization.
ensure user test is present in github:
github.present:
- name: 'Example TestUser1'
- email: example@domain.com
- username: 'gitexample'
Ensure a github user is absent
ensure user test is absent in github:
github.absent:
- name: 'Example TestUser1'
- email: example@domain.com
- username: 'gitexample'
The following parameters are required:
Github handle of the user in organization
Ensure a user is present
ensure user test is present in github:
github.present:
- name: 'gitexample'
The following parameters are required:
This is the github handle of the user in the organization
Ensure a repo is absent.
Example:
ensure repo test is absent in github:
github.repo_absent:
- name: 'test'
The following parameters are required:
This is the name of the repository in the organization.
New in version 2016.11.0.
Ensure a repository is present
This is the name of the repository.
The description of the repository.
The URL with more information about the repository.
The visiblity of the repository. Note that private repositories require a paid GitHub account.
Whether to enable issues for this repository.
Whether to enable the wiki for this repository.
Whether to enable downloads for this repository.
Whether to create an initial commit with an empty README.
The desired language or platform for a .gitignore, e.g "Haskell".
The desired LICENSE template to apply, e.g "mit" or "mozilla".
The teams for which this repo should belong to, specified as a dict of team name to permission ('pull', 'push' or 'admin').
New in version 2017.7.0.
Example:
Ensure repo my-repo is present in github:
github.repo_present:
- name: 'my-repo'
- description: 'My very important repository'
New in version 2016.11.0.
Ensure a team is absent.
Example:
ensure team test is present in github:
github.team_absent:
- name: 'test'
The following parameters are required:
This is the name of the team in the organization.
New in version 2016.11.0.
Ensure a team is present
This is the name of the team in the organization.
The description of the team.
The names of repositories to add the team to.
The level of privacy for the team, can be 'secret' or 'closed'. Defaults to secret.
The default permission for new repositories added to the team, can be 'pull', 'push' or 'admin'. Defaults to pull.
The members belonging to the team, specified as a dict of member name to optional configuration. Options include 'enforce_mfa_from' and 'mfa_exempt'.
Whether to enforce MFA requirements on members of the team. If True then all members without mfa_exempt: True configured will be removed from the team. Note that no_mfa_grace_seconds may be set to allow members a grace period.
The number of seconds of grace time that a member will have to enable MFA before being removed from the team. The grace period will begin from enforce_mfa_from on the member configuration, which defaults to 1970/01/01.
Example:
Ensure team test is present in github:
github.team_present:
- name: 'test'
- members:
user1: {}
user2: {}
Ensure team test_mfa is present in github:
github.team_present:
- name: 'test_mfa'
- members:
user1:
enforce_mfa_from: 2016/06/15
- enforce_mfa: True
New in version 2016.11.0.