将Nginx与Ansible安装到没有互联网连接的目标机器



远程系统是 Ubuntu Server 16.04。它已连接到内部网环境,但没有互联网连接。如何使用AnsibleNginx安装到此类远程计算机上?

如果本地计算机之间存在
任何连接,nginx源文件上传到远程计算机,将其解压缩并执行:

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

最新更新