Giter VIP home page Giter VIP logo

xergio / aws-hostname-change-based-on-tag-scripts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from calvintrobinson/aws-hostname-change-based-on-tag-scripts

0.0 2.0 0.0 31 KB

These Scripts change the OS level hostname of an AWS instance to a value supplied via a tag. There is an enclosed script for RHEL Linux (bash) and for Windows (powershell) in this repository.

Shell 54.47% PowerShell 45.53%

aws-hostname-change-based-on-tag-scripts's Introduction

AWS-Hostname-Change-Based-on-Tag-Scripts

These Scripts change the OS level hostname of an AWS instance to a value supplied via a tag. There is an enclosed script for RHEL Linux (bash) and for Windows (powershell) in this repository.

** Each script leverages the AWS CLI tools to grab the tag from within the instance itself
** This script assumes the AWS CLI tools are not installed and will therefore install them using pip. This will require Python, which for the Windows script will also be installed (script assumes your Linux distro already has Python)
** Also, please be aware that if you run this in an enterprise, you will need to set your proxy settings accordingly as this script requires internet access (you could of course modify accordingly if you want to curl the artifacts from your local web server)

Requirements:

  • Using an IAM policy, you should privilege an account in AWS which can read tags from an AWS instance. Privileges greater than this aren't required
  • It is assumed that Python is installed on your Linux instance
  • You should have a tag on your AWS instance which supplies the hostname. In my case, the tag is called "Name."
  • A reboot should occur on your instance after the script runs
  • Constants in these scripts should be changed to suit your environment

Disclaimer

As there is always some level of risk assumed when executing a script, please take precautions such as backing up/ snapshotting your hosts before running these scripts. My environment these were run on were RHEL 7.0 and Windows Server 2012 R2. I will not be held responsible for any harm encountered ignoring this disclaimer

aws-hostname-change-based-on-tag-scripts's People

Contributors

calvintrobinson avatar

Watchers

 avatar  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.