gitops

Welcome to role gitops 👋

Build Status pipeline status Version Documentation License: MIT Twitter: fcruzcoelho

Clone repository via HTTP or HTTPS

Install

  • requirements.yml
---
- name: gitops
  src: fabiocruzcoelho.gitops
ansible-galaxy install -r requirements.yml

Role Variables

Available variables are along with default values see: defaults/main.yml

Examplo playbook

---
- name: Lint it
  hosts: localhost
  gather_facts: yes
  become: yes
  vars:
    git_project_name: gitops
    git_clone_path: "/projects/{{ git_project_name }}"
    git_username: ''
    git_password: ''

  tasks:
  - name: Git clone
    include_role:
      name: gitops
    vars:
      gitops_clone: yes
      gitops:
        repo_path: "{{ git_clone_path }}"
        username: "{{ git_username }}"
        password: "{{ git_password }}"
        protocol: http
        url: gitlab.com
        repo_uri: /ansible/roles/{{ git_project_name }}.git
        branch: master

  - name: Create new file
    file:
      path: "{{ git_clone_path }}/foo.conf"
      state: touch

  - name: Git commit
    include_role:
      name: gitops
    vars:
      gitops_commit: yes
      gitops:
        username: "{{ git_username }}"
        email: [email protected]
        msg: 'Added: new Virtual Host by Ansble'
        repo_path: "{{ git_clone_path }}"

Run tests

Dependence

git clone https://gitlab.com/estudosdevops/ansible/roles/gitops.git
make test

Author

👤 Fabio Coelho

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2020 Fabio Coelho.
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

About

Git clone via HTTP or HTTPS

Install
ansible-galaxy install fabiocruzcoelho/ansible-role-gitops
GitHub repository
License
mit
Downloads
31
Owner
Profissional com 11 anos de experiência em infraestrutura de TI, sendo que nos últimos 3 anos venho atuando como DevOps Engineer