离线Ansible Control Machine安装 [英] Offline Ansible Control Machine installation

查看:61
本文介绍了离线Ansible Control Machine安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在无法访问互联网的公司防火墙后面安装Ansible Control Machine.我找不到脱机安装的文档.我可以在工作站上下载我想要的任何东西,并且可以将其复制到目标计算机上.我曾尝试过在线搜索,但无法找到有关如何执行此操作的示例.我的服务器是Ubuntu 14.04,但如果有人拥有Red Hat或其他发行版的文档,这也将有所帮助.

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 workstation to download anything I want and can copy it to the target machine. I have tried searching online but have not been able to find examples on how to do this. My server is Ubuntu 14.04 but if anyone has documentation for Red Hat or another distro that would also help.

推荐答案

我在RH6上进行了测试,因此,如果您具有可访问Internet的RH6来下载所有必需的安装文件以及RH6安装ISO.您应该能够实现这一目标.

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.

假设您有一台可以访问Internet的RH6,我们将其称为A.另外一个没有访问权限的:B.

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

  1. 从A下载Ansible和Jinja2,然后将文件复制到B. 对于Ansible: http://docs.ansible.com/ansible/intro_installation.html Ansible需要Jinja2,请在此处下载: https://pypi.python.org/pypi/Jinja2

  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

将RH6安装ISO安装到RH6 B,然后安装所需的RPM. 就我而言,我还安装了PIP:

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

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

//以下是Git必需的 rpm -ivh --force --nodeps perl-Git-1.7.1-3.el6_4.1.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

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

注意:我没有在这里安装httplib2,以后可以做.

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

  1. 安装MarkupSafe(Jinja2必需)

//安装MarkupSafe

//install MarkupSafe

tar -xvf MarkupSafe-0.23.tar.gz

tar -xvf MarkupSafe-0.23.tar.gz

cd MarkupSafe-0.23/

cd MarkupSafe-0.23/

sudo python setup.py安装

sudo python setup.py install

  1. 安装Jinja2

//安装Jinjia2

//install Jinjia2

tar -xvf Jinja2-2.8.tar.gz

tar -xvf Jinja2-2.8.tar.gz

cd Jinja2-2.8/

cd Jinja2-2.8/

sudo python setup.py安装

sudo python setup.py install

  1. 在RH6 B上,您现在应该可以运行Ansible:

tar -zxvf ansible.tar.gz

tar -zxvf ansible.tar.gz

source ./hacking/env-setup

source ./hacking/env-setup

echo"127.0.0.1">〜/ansible_hosts

echo "127.0.0.1" > ~/ansible_hosts

导出ANSIBLE_INVENTORY =〜/ansible_hosts

export ANSIBLE_INVENTORY=~/ansible_hosts

ansible --version

ansible --version

这篇关于离线Ansible Control Machine安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆