Skip to content

Commit

Permalink
Merge pull request #15 from nginxinc/ubuntu-support
Browse files Browse the repository at this point in the history
Add support for Ubuntu 18.04 LTS
  • Loading branch information
aknot242 authored Sep 6, 2020
2 parents ce88653 + a221c65 commit 3bda56c
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 10 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ Debian:
- 9.10
- 9.11
- 9.12
Ubuntu:
versions:
- 18.04
```
Role Variables
Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ app_protect_linux_families:
- 9.10
- 9.11
- 9.12
Ubuntu:
- 18.04

app_protect_security_policy_template_enable: true
app_protect_security_policy_template:
Expand Down
3 changes: 3 additions & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ galaxy_info:
- name: Debian
versions:
- stretch
- name: Ubuntu
versions:
- bionic

galaxy_tags:
- waf
Expand Down
6 changes: 3 additions & 3 deletions sample-playbook/nginx-app-protect-playbook.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
- hosts: wafs
remote_user: centos
remote_user: centos
pre_tasks:
- name: load the vars
include_vars:
include_vars:
file: "{{playbook_dir}}/nginx-app-protect-vars.yml"
roles:
- nginxinc.nginx_app_protect
- nginxinc.nginx_app_protect
4 changes: 2 additions & 2 deletions tasks/prerequisites/install-prerequisites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
msg: "ansible_distribution {{ ansible_distribution }}"
verbosity: 2

- name: "(Setup: Debian) Install Prerequisites"
- name: "(Setup: Debian/Ubuntu) Install Prerequisites"
import_tasks: setup-debian.yml
when: ansible_distribution == "Debian"
when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"

- name: "(Setup: CentOS) Install Prerequisites"
import_tasks: setup-centos.yml
Expand Down
4 changes: 2 additions & 2 deletions tasks/prerequisites/setup-debian.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: "(Install: Debian) Install Required Debian Dependencies"
- name: "(Setup: Debian/Ubuntu) Install Required Debian and Ubuntu Dependencies"
package:
name: apt-transport-https, lsb-release, ca-certificates
name: apt-transport-https, lsb-release, ca-certificates, wget
state: present
6 changes: 3 additions & 3 deletions tasks/setup-debian-repos.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
- name: "(Setup: Debian) Setup NGINX App Protect Repository"
- name: "(Setup: Debian/Ubuntu) Setup NGINX App Protect Repository"
apt_repository:
repo: deb [arch=amd64] https://plus-pkgs.nginx.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} nginx-plus
filename: nginx-plus
update_cache: false
state: "{{ nginx_license_status | default ('present') }}"

- name: "(Setup: Debian) Setup NGINX App Protect Signatures Repository"
- name: "(Setup: Debian/Ubuntu) Setup NGINX App Protect Signatures Repository"
apt_repository:
repo: deb [arch=amd64] https://app-protect-sigs.nginx.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} nginx-plus
filename: app-protect-sigs
Expand Down Expand Up @@ -35,6 +35,6 @@
Acquire::https::app-protect-sigs.nginx.com::SslKey "/etc/ssl/nginx/{{ nginx_license.key | basename }}";
state: "{{ nginx_license_status | default ('present') }}"

- name: "(Setup: Debian) Update APT Cache"
- name: "(Setup: Debian/Ubuntu) Update APT Cache"
apt:
update_cache: true

0 comments on commit 3bda56c

Please sign in to comment.