esp.bitbucket.git_init (1.4.1) — module

Initialize local empty repository

| "added in version" 1.3.0 of esp.bitbucket"

Authors: Pawel Smolarz (pawel.smolarz@nordea.com), Krzysztof Lewandowski (@klewan)

Install collection

Install with ansible-galaxy collection install esp.bitbucket:==1.4.1


Add to requirements.yml

  collections:
    - name: esp.bitbucket
      version: 1.4.1

Description

Initializes local empty repository.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Initialize git repository
  esp.bitbucket.git_init:  
    path: /tmp/bar 
    force: no   
  register: _result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Initialize git repository, but first delete the directory if it exists
  esp.bitbucket.git_init:  
    path: /tmp/bar 
    force: yes   
  register: _result

Inputs

    
force:
    default: false
    description:
    - Force initalization, i.e. delete the repo directory if it already exists, then initialize.
    required: false
    type: bool

repodir:
    aliases:
    - path
    description:
    - Repository directory.
    required: true
    type: str

Outputs

changed:
  description: Whether or not repository has been initialized.
  returned: success
  sample: true
  type: bool