GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ansible/install_ansible_on_Amazon_linux.md at master · mydevops1678/ansible

Expand file tree

/

install_ansible_on_Amazon_linux.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
62 lines (48 loc) · 1.72 KB
/

install_ansible_on_Amazon_linux.md

Copy path

File metadata and controls

62 lines (48 loc) · 1.72 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Ansible Installation

Ansible is an open-source automation platform. It is very, very simple to set up and yet powerful. Ansible can help you with configuration management, application deployment, task automation.

Pre-requisites

  1. An AWS EC2 instance (on Control node)

Installation steps:

on Amazon EC2 instance

  1. Install python and python-pip

    yum install python
    yum install python-pip
  2. Install ansible using pip check for version

    pip install ansible
    ansible --version
  3. Create a user called ansadmin (on Control node and Managed host)

    useradd ansadmin
    passwd ansadmin
  4. Below command grant sudo access to ansadmin user. But we strongly recommended using "visudo" command if you are aware vi or nano editor. (on Control node and Managed host)

    echo "ansadmin ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
  5. Log in as a ansadmin user on master and generate ssh key (on Control node)

    ssh-keygen
  6. Copy keys onto all ansible managed hosts (on Control node)

    ssh-copy-id ansadmin@<target-server>
  7. Ansible server used to create images and store on docker registry. Hence install docker, start docker services and add ansadmin to the docker group.

    yum install docker
    
    # start docker services 
    service docker start
    service docker start 
    
    # add user to docker group 
    usermod -aG docker ansadmin
    
  8. Create a directory /etc/ansible and create an inventory file called "hosts" add control node and managed hosts IP addresses to it.

Validation test

  1. Run ansible command as ansadmin user it should be successful (Master)
    ansible all -m ping
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.