Commit f1a27ae3 authored by JooHan Hong's avatar JooHan Hong

web, modify

parent a29bb538
Pipeline #5136 passed with stages
in 2 seconds
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
## 주요 기능 ## 주요 기능
- 특정 버전의 Nginx WEB Server를 설치한다. - 특정 버전의 Nginx WEB Server를 설치한다.
- OS 배포판에 따라 취사선택(Facts 변수)해서 설치한다.
- 미리 검증된 Configs를 배포한다. - 미리 검증된 Configs를 배포한다.
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
```bash ```bash
# cat hosts # cat hosts
[ALL_HOSTS] [ALL_HOSTS]
172.16.0.100 managed_ip=172.16.0.100 des="2020-12-03" 172.16.0.100 managed_ip=172.16.0.100 des="2020-12-03" apps="nginx"
[ALL_HOSTS_OK] [ALL_HOSTS_OK]
``` ```
...@@ -47,12 +48,20 @@ ansible_python_interpreter: python2.7 ...@@ -47,12 +48,20 @@ ansible_python_interpreter: python2.7
hosts: ALL_HOSTS hosts: ALL_HOSTS
vars: vars:
time: "{{lookup('pipe','date \"+%Y-%m-%d\"')}}" time: "{{lookup('pipe','date \"+%Y-%m-%d\"')}}"
nginx_version: "1.10.3-1+deb9u3" nginx_version_debian: "1.10.3-1+deb9u3"
nginx_version_centos: "nginx-1.16.1-3.el7"
tasks: tasks:
- name: Nginx {{ nginx_version }} Install - name: Nginx {{ nginx_version_debian }} Install
apt: apt:
pkg: pkg:
- nginx=1.10.3-1+deb9u3 - nginx=1.10.3-1+deb9u3
when: ansible_os_family == "Debian"
- name: Nginx {{ nginx_version_centos }} Install
yum:
name: nginx-1.16.1-3.el7
state: present
when: ansible_os_family == "CentOS"
- name: /etc/nginx_src directory check - name: /etc/nginx_src directory check
stat: stat:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment