GithubHelp home page GithubHelp logo

ansible_copy_from_github's Introduction

ansible_copy_from_github

This play will download some content from github, specifically some raw code and will save it in a remote machine.

To set the remote code and file name that will be saved, you can change as below

  vars:
    github_links:
      - url: https://raw.githubusercontent.com/Qikfix/rpmdb_check/main/rpmdb_check.sh
        filename: rpmdb_check.sh

Also, you will notice that some commands will be executed on the remote server delegate_to: remote_server

    - name: Ensure the directory {{ remote_dir }} is present remotely
      delegate_to: remote_server
      ansible.builtin.file:
        path: "{{ remote_dir }}"
        state: directory
        mode: '0755'

Here, you can use two approaches

  1. Set the FQDN of the server in front of delegate_to

or

  1. In the inventory file, you can set as below. Set first the alias and after ansible_host, you can set the FQDN.
remote_server ansible_host=REMOTE_SERVER_FQDN_HERE

Finally, just call the bash script. It will create the virtual environment, it will install ansible and will call the play main.yml

Special thanks to my friend Pablo Hess!

I hope you enjoy it.

ansible_copy_from_github's People

Contributors

waldirio avatar

Stargazers

dsheets avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.