Add proper support for building NGINX from source in CentOS 6 (#320)
This commit is contained in:
parent
17b5c87d71
commit
28d1da5e0a
@ -1,6 +1,9 @@
|
|||||||
---
|
---
|
||||||
language: python
|
language: python
|
||||||
services: docker
|
services: docker
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- name: "(Debian/Ubuntu) Install Specific Version"
|
- name: "(Debian/Ubuntu) Install Specific Version"
|
||||||
@ -70,5 +73,6 @@ install:
|
|||||||
- pip install docker==4.3.1
|
- pip install docker==4.3.1
|
||||||
script:
|
script:
|
||||||
- travis_wait 50 molecule test -s $scenario
|
- travis_wait 50 molecule test -s $scenario
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
webhooks: https://galaxy.ansible.com/api/v1/notifications/
|
||||||
|
@ -30,6 +30,7 @@ ENHANCEMENTS:
|
|||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
* NGINX Plus repository data for RHEL based distros is now appropriately set.
|
* NGINX Plus repository data for RHEL based distros is now appropriately set.
|
||||||
|
* Building NGINX from source should now work as expected in CentOS/RHEL 6 systems running Python `2.6` or earlier versions of `2.7`.
|
||||||
|
|
||||||
## 0.16.0 (August 28, 2020)
|
## 0.16.0 (August 28, 2020)
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@ platforms:
|
|||||||
- name: centos-6
|
- name: centos-6
|
||||||
image: centos:6
|
image: centos:6
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||||
|
command: "/sbin/init"
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
image: centos:7
|
image: centos:7
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
@ -9,6 +9,10 @@ platforms:
|
|||||||
- name: centos-6
|
- name: centos-6
|
||||||
image: centos:6
|
image: centos:6
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||||
|
command: "/sbin/init"
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
image: centos:7
|
image: centos:7
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
@ -9,6 +9,10 @@ platforms:
|
|||||||
- name: centos-6
|
- name: centos-6
|
||||||
image: centos:6
|
image: centos:6
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||||
|
command: "/sbin/init"
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
image: centos:7
|
image: centos:7
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
@ -6,6 +6,13 @@ lint: |
|
|||||||
yamllint .
|
yamllint .
|
||||||
ansible-lint --force-color
|
ansible-lint --force-color
|
||||||
platforms:
|
platforms:
|
||||||
|
- name: centos-6
|
||||||
|
image: centos:6
|
||||||
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||||
|
command: "/sbin/init"
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
image: centos:7
|
image: centos:7
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
@ -9,6 +9,10 @@ platforms:
|
|||||||
- name: centos-6
|
- name: centos-6
|
||||||
image: centos:6
|
image: centos:6
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||||
|
command: "/sbin/init"
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
image: centos:7
|
image: centos:7
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
@ -9,6 +9,10 @@ platforms:
|
|||||||
- name: centos-6
|
- name: centos-6
|
||||||
image: centos:6
|
image: centos:6
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||||
|
command: "/sbin/init"
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
image: centos:7
|
image: centos:7
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
@ -9,6 +9,10 @@ platforms:
|
|||||||
- name: centos-6
|
- name: centos-6
|
||||||
image: centos:6
|
image: centos:6
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
privileged: true
|
||||||
|
volumes:
|
||||||
|
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
|
||||||
|
command: "/sbin/init"
|
||||||
- name: centos-7
|
- name: centos-7
|
||||||
image: centos:7
|
image: centos:7
|
||||||
dockerfile: ../common/Dockerfile.j2
|
dockerfile: ../common/Dockerfile.j2
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
---
|
---
|
||||||
- name: "Check for build tools"
|
- name: "Check for build tools"
|
||||||
block:
|
block:
|
||||||
- name: "(CentOS/RHEL 8) Setup python 3"
|
- name: "(CentOS/RHEL 8) Setup Python 3"
|
||||||
block:
|
block:
|
||||||
- name: "(CentOS/RHEL 8) Install python 3"
|
- name: "(CentOS/RHEL 8) Install Python 3"
|
||||||
yum:
|
yum:
|
||||||
name:
|
name:
|
||||||
- python3
|
- python3
|
||||||
@ -11,7 +11,7 @@
|
|||||||
- python3-devel
|
- python3-devel
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: "(Centos/RHEL 8) Set python 3 as default"
|
- name: "(Centos/RHEL 8) Set Python 3 as default"
|
||||||
alternatives:
|
alternatives:
|
||||||
name: python
|
name: python
|
||||||
path: /usr/bin/python3
|
path: /usr/bin/python3
|
||||||
@ -36,7 +36,7 @@
|
|||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: ansible_facts['os_family'] == "RedHat"
|
when: ansible_facts['os_family'] == "RedHat"
|
||||||
|
|
||||||
- name: "(Debian) Install backports repo for buster"
|
- name: "(Debian) Install backports repo for 'buster'"
|
||||||
apt_repository:
|
apt_repository:
|
||||||
filename: buster-backports
|
filename: buster-backports
|
||||||
repo: deb http://ftp.us.debian.org/debian buster-backports main
|
repo: deb http://ftp.us.debian.org/debian buster-backports main
|
||||||
@ -130,6 +130,8 @@
|
|||||||
url: "https://ftp.pcre.org/pub/pcre/{{ pcre_version }}.tar.gz"
|
url: "https://ftp.pcre.org/pub/pcre/{{ pcre_version }}.tar.gz"
|
||||||
dest: "/tmp/{{ pcre_version }}.tar.gz"
|
dest: "/tmp/{{ pcre_version }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
validate_certs: >-
|
||||||
|
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
||||||
register: pcre_source
|
register: pcre_source
|
||||||
|
|
||||||
- name: "Unpack PCRE dependency"
|
- name: "Unpack PCRE dependency"
|
||||||
@ -187,6 +189,8 @@
|
|||||||
url: "https://zlib.net/{{ zlib_version }}.tar.gz"
|
url: "https://zlib.net/{{ zlib_version }}.tar.gz"
|
||||||
dest: "/tmp/{{ zlib_version }}.tar.gz"
|
dest: "/tmp/{{ zlib_version }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
validate_certs: >-
|
||||||
|
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
||||||
register: zlib_source
|
register: zlib_source
|
||||||
|
|
||||||
- name: "Unpack ZLib dependency"
|
- name: "Unpack ZLib dependency"
|
||||||
@ -244,6 +248,8 @@
|
|||||||
url: "https://www.openssl.org/source/{{ openssl_version }}.tar.gz"
|
url: "https://www.openssl.org/source/{{ openssl_version }}.tar.gz"
|
||||||
dest: "/tmp/{{ openssl_version }}.tar.gz"
|
dest: "/tmp/{{ openssl_version }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
validate_certs: >-
|
||||||
|
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
||||||
register: openssl_source
|
register: openssl_source
|
||||||
|
|
||||||
- name: "Unpack OpenSSL dependency"
|
- name: "Unpack OpenSSL dependency"
|
||||||
@ -276,6 +282,8 @@
|
|||||||
uri:
|
uri:
|
||||||
url: https://trac.nginx.org/nginx/browser
|
url: https://trac.nginx.org/nginx/browser
|
||||||
return_content: yes
|
return_content: yes
|
||||||
|
validate_certs: >-
|
||||||
|
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
||||||
register: nginx_versions
|
register: nginx_versions
|
||||||
|
|
||||||
- name: "Set NGINX mainline version"
|
- name: "Set NGINX mainline version"
|
||||||
@ -314,6 +322,8 @@
|
|||||||
url: "https://nginx.org/download/{{ nginx_download_name }}.tar.gz"
|
url: "https://nginx.org/download/{{ nginx_download_name }}.tar.gz"
|
||||||
dest: "/tmp/{{ nginx_download_name }}.tar.gz"
|
dest: "/tmp/{{ nginx_download_name }}.tar.gz"
|
||||||
mode: 0600
|
mode: 0600
|
||||||
|
validate_certs: >-
|
||||||
|
{{ (ansible_facts['os_family'] == 'RedHat' and ansible_facts['distribution_major_version'] is version('6', '==')) | ternary('no', 'yes') }}
|
||||||
register: nginx_source
|
register: nginx_source
|
||||||
|
|
||||||
- name: "Unpack NGINX"
|
- name: "Unpack NGINX"
|
||||||
@ -379,7 +389,7 @@
|
|||||||
mode: 0755
|
mode: 0755
|
||||||
when: ansible_facts['service_mgr'] == "upstart"
|
when: ansible_facts['service_mgr'] == "upstart"
|
||||||
|
|
||||||
- name: "Upload upstart NGINX service conf file"
|
- name: "Upload Upstart NGINX service conf file"
|
||||||
copy:
|
copy:
|
||||||
src: services/nginx.conf.upstart
|
src: services/nginx.conf.upstart
|
||||||
dest: /etc/init/nginx.conf
|
dest: /etc/init/nginx.conf
|
||||||
@ -388,16 +398,16 @@
|
|||||||
mode: 0644
|
mode: 0644
|
||||||
when: ansible_facts['service_mgr'] == "upstart"
|
when: ansible_facts['service_mgr'] == "upstart"
|
||||||
|
|
||||||
- name: "Enable upstart NGINX service reload"
|
- name: "Enable Upstart NGINX service reload"
|
||||||
command: "initctl reload-configuration"
|
command: "initctl reload-configuration"
|
||||||
when: ansible_facts['service_mgr'] == "upstart"
|
when: ansible_facts['service_mgr'] == "upstart"
|
||||||
|
|
||||||
- name: "Start upstart NGINX service reload"
|
- name: "Start Upstart NGINX service reload"
|
||||||
command: "nginx"
|
command: "nginx"
|
||||||
when: ansible_facts['service_mgr'] == "upstart"
|
when: ansible_facts['service_mgr'] == "upstart"
|
||||||
notify: "(Handler) Start NGINX"
|
notify: "(Handler) Start NGINX"
|
||||||
|
|
||||||
- name: "Upload sysvinit NGINX service file"
|
- name: "Upload SysVinit NGINX service file"
|
||||||
copy:
|
copy:
|
||||||
src: services/nginx.sysvinit
|
src: services/nginx.sysvinit
|
||||||
dest: /etc/init.d/nginx
|
dest: /etc/init.d/nginx
|
||||||
@ -407,7 +417,7 @@
|
|||||||
when: ansible_facts['service_mgr'] == "sysvinit"
|
when: ansible_facts['service_mgr'] == "sysvinit"
|
||||||
notify: "(Handler) Start NGINX"
|
notify: "(Handler) Start NGINX"
|
||||||
|
|
||||||
- name: "Upload openrc NGINX service file"
|
- name: "Upload OpenRC NGINX service file"
|
||||||
copy:
|
copy:
|
||||||
src: services/nginx.openrc
|
src: services/nginx.openrc
|
||||||
dest: /etc/init.d/nginx
|
dest: /etc/init.d/nginx
|
||||||
@ -416,7 +426,7 @@
|
|||||||
mode: 0755
|
mode: 0755
|
||||||
when: ansible_facts['service_mgr'] == "openrc"
|
when: ansible_facts['service_mgr'] == "openrc"
|
||||||
|
|
||||||
- name: "Enable openrc NGINX service"
|
- name: "Enable OpenRC NGINX service"
|
||||||
command: rc-update add nginx default
|
command: rc-update add nginx default
|
||||||
when: ansible_facts['service_mgr'] == "openrc"
|
when: ansible_facts['service_mgr'] == "openrc"
|
||||||
notify: "(Handler) Start NGINX"
|
notify: "(Handler) Start NGINX"
|
||||||
|
Loading…
Reference in New Issue
Block a user