Git Product home page Git Product logo

ansible_kubectl_krew's Introduction

Role Name

ansible_kubectl_krew


Requirements

  • Ansible 2.9 or higher
  • Targeted OS: Deiban/Ubuntu, RHEL/CentOS (For now)

Role Variables

The variables below can be modified in the ~/vars.yml file as per your requirements:

  • home_user: User for which the tooling setup should be applied.
  • krew_version: Desired version of krew. Default: v0.4.4
  • krew_plugins: List of krew plugins to be installed.

Dependencies

None.


Example Playbook

Running Locally

1. Setting Up the Variable File

Define the necessary variables in the vars.yml file:

# vars.yml
home_user: "somaz"
krew_version: "v0.4.4"
krew_plugins:
  - "ctx"
  - "neat"
  - "ns"
  # more... 

2. Creating the Playbook

Write the playbook in the site.yml file:

# site.yml
---
- hosts: localhost
  become: yes
  vars_files:
    - ~/vars.yml
  roles:
    - somaz94.ansible-kubectl-krew

3. Running the Playbook

Execute the playbook with the following command:

ansible-playbook site.yml

Running Remotely

1. Setting Up the Variable File

Define the necessary variables in the vars.yml file:

# vars.yml
home_user: "somaz"
krew_version: "v0.4.4"
krew_plugins:
  - "ctx"
  - "neat"
  - "ns"
  # more... 

2. Setting Up the Inventory File

Define the remote server information and connection details in the inventory.ini file:

# inventory.ini
[test_servers]
test-server ansible_ssh_user=somaz ansible_ssh_private_key_file=/home/somaz/.ssh/id_rsa_somaz94

3. Creating the Playbook

Write the playbook in the site.yml file:

# site.yml
---
- hosts: test_servers
- hosts: <hosts> # Remote Server
  become: yes
  vars_files:
    - ~/vars.yml
  roles:
    - somaz94.ansible-kubectl-krew

4. Running the Playbook

Execute the playbook with the following command:

ansible-playbook -i inventory.ini site.yml

License

This project is licensed under the MIT License - see the LICENSE file for details.


Author Information

ansible_kubectl_krew's People

Contributors

somaz94 avatar

Stargazers

 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.