【发布时间】:2018-09-17 09:28:21
【问题描述】:
远程系统是 Ubuntu Server 16.04。它连接到 Intranet 环境,但没有 Internet 连接。如何将Nginx 安装到带有Ansible 的远程机器上?
【问题讨论】:
-
如果目标机器没有网络连接,那么如何连接呢?
-
下载我需要部署在中控机上的软件。网络环境为内网环境。
远程系统是 Ubuntu Server 16.04。它连接到 Intranet 环境,但没有 Internet 连接。如何将Nginx 安装到带有Ansible 的远程机器上?
【问题讨论】:
如果两者之间有任何连接,请将nginx source file 上传到远程机器
本地机器,解压并执行:
./configure
make
sudo make install
需要使用Ansible 执行以下操作,但可能需要进一步的步骤:
- name: Upload nginx source file and unarchive
unarchive:
src: nginx-1.10.1.tar.gz
dest: /tmp/nginx-1.10.1
- name: Build and install from source
shell: ./configure && make && make install
args:
chdir: /tmp/nginx-1.10.1
become: true
【讨论】: