Offline Ansible Control Machine installation

前端 未结 2 1219
北恋
北恋 2021-01-19 10:58

I need to install Ansible Control Machine behind a corporate firewall with no internet access. I can\'t find documentation for an offline install. I have access on my workst

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-19 11:13

    I did a testing on my RH6, so if you have a RH6 with Internet access to download all required installation file, and a RH6 installation ISO. You should be able to achieve this.

    Assuming you have a RH6 which has Internet access, let's call it A. And another one doesn't have access: B.

    1. download Ansible and Jinja2 from A, and copy the files to B. For Ansible: http://docs.ansible.com/ansible/intro_installation.html Jinja2 is required for Ansible, download it here: https://pypi.python.org/pypi/Jinja2

    2. Mount the RH6 installation ISO to your RH6 B, then install the required RPM. In my case, i installed PIP as well:

    rpm -ivh python-paramiko-1.7.5-2.1.el6.noarch.rpm libyaml-0.1.3-4.el6_6.x86_64.rpm PyYAML-3.10-3.1.el6.x86_64.rpm perl-TermReadKey-2.30-13.el6.x86_64.rpm perl-Error-0.17015-4.el6.noarch.rpm python-six-1.9.0-2.el6.noarch.rpm

    //following required for Git rpm -ivh --force --nodeps perl-Git-1.7.1-3.el6_4.1.noarch.rpm

    rpm -ivh git-1.7.1-3.el6_4.1.x86_64.rpm

    Note: i didn't install httplib2 here, you can do it later.

    1. install MarkupSafe (required for Jinja2)

    //install MarkupSafe

    tar -xvf MarkupSafe-0.23.tar.gz

    cd MarkupSafe-0.23/

    sudo python setup.py install

    1. install Jinja2

    //install Jinjia2

    tar -xvf Jinja2-2.8.tar.gz

    cd Jinja2-2.8/

    sudo python setup.py install

    1. On RH6 B, you should be able to run Ansible now:

    tar -zxvf ansible.tar.gz

    source ./hacking/env-setup

    echo "127.0.0.1" > ~/ansible_hosts

    export ANSIBLE_INVENTORY=~/ansible_hosts

    ansible --version

提交回复
热议问题