Skip to main content

git-acp-ansible

git_acp is an Ansible module for git add, git commit, git push and git config operations on local or remote (https/ssh) git repo.

PyPi Install:

To install the module just run the command:

pip install git-acp-ansible

Edit your ansible.cfg file and add the path where git_acp module is installed.

i.e.

[defaults]
library = ./lib/python3.7/site-packages/git-acp-ansible/modules

If you run a virtualenv most probably the path would be something similar to the example above. Otherwise you can use for example mlocate to find where the module is.

For more info, have a look to Ansible Docs

Ansible Galaxy Install (for Ansible version > 2.9)

All info related to Ansible Galax install are available here

Module Documentation:

module: git_acp
options:
    path:
        description:
            - Folder path where C(.git/) is located.
        required: true
        type: path
    comment:
        description:
            - Git commit comment. Same as C(git commit -m).
        type: str
        required: true
    add:
        description:
            - List of files under C(path) to be staged. Same as C(git add .).
              File globs not accepted, such as C(./*) or C(*).
        type: list
        elements: str
        default: ["."]
    user:
        description:
            - Git username for https operations.
        type: str
    token:
        description:
            - Git API token for https operations.
        type: str
    branch:
        description:
            - Git branch where perform git push.
        required: True
        type: str
    push_option:
        description:
            - Git push options. Same as C(git --push-option=option).
        type: str
    mode:
        description:
            - Git operations are performend eithr over ssh, https or local.
              Same as C(git@git...) or C(https://user:token@git...).
        choices: ['ssh', 'https', 'local']
        default: ssh
        type: str
    url:
        description:
            - Git repo URL.
        required: True
        type: str
    remote:
        description:
            - Local system alias for git remote PUSH and PULL repository operations.
        type: str
        default: origin
    user_name:
        description:
            - Explicit git local user name. Nice to have for remote operations.
        type: str
    user_email:
        description:
            - Explicit git local email address. Nice to have for remote operations.
        type: str

Examples:

- name: HTTPS | add file1.
  git_acp:
    user: Federico87
    token: mytoken
    path: /Users/git/git_acp
    branch: master
    comment: Add file1.
    remote: origin
    add: [ "." ]
    mode: https
    url: "https://gitlab.com/networkAutomation/git_test_module.git"

- name: SSH | add file1.
  git_acp:
    path: /Users/git/git_acp
    branch: master
    comment: Add file1.
    add: [ file1  ]
    remote: dev_test
    mode: ssh
    url: "git@gitlab.com:networkAutomation/git_test_module.git"
    user_name: lvrfrc87
    user_email: lvrfrc87@gmail.com

- name: LOCAL | push on local repo.
  git_acp:
    path: "~/test_directory/repo"
    branch: master
    comment: Add file1.
    add: [ file1 ]
    mode: local
    url: /Users/federicoolivieri/test_directory/repo.git

Metadata

Release files for git-acp-ansible 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-acp-ansible 1.1.2
File Size Uploaded Provenance Actions
git-acp-ansible-1.1.2.tar.gz 6.2 kB Without provenance Details for git-acp-ansible-1.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-acp-ansible 1.1.2
File Interpreter ABI Platform Actions
git_acp_ansible-1.1.2-py3-none-any.whl Python 3 none any Details for git_acp_ansible-1.1.2-py3-none-any.whl

Total release size: 24.6 kB

Release files / git-acp-ansible-1.1.2.tar.gz

Download URL git-acp-ansible-1.1.2.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6eef4d2a2370dd57dc444388b98f5b4346eb37a5b5a35f93790351fdea37b027
BLAKE2b-256 checksum
How to use checksums
bbbfe2a57c7109ecc8eae033efcceb2e610fe19cefdbdc3d368d6e267b5c00ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

Release files / git_acp_ansible-1.1.2-py3-none-any.whl

Download URL git_acp_ansible-1.1.2-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
482c3fc96bc65be81349b9b3dcc386398e41b0c7d54dfbd3f43fcc501d82c091
BLAKE2b-256 checksum
How to use checksums
11a5cb1c47c8b19936e2a4123e392d9ba5e788a60eab36441f899842ad461b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.9.0

Security for git-acp-ansible 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page