Start role refactor

We really haven't updated this role in some time, so update it to use
layout from other roles.

Change-Id: Iff72ea8983c4ff98ef92b50f27e2a910734f237a
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-03-30 22:01:21 -04:00
parent 87a3feff6a
commit c5d393b888
6 changed files with 18 additions and 27 deletions

View File

@ -12,6 +12,12 @@
# License for the specific language governing permissions and limitations
# under the License.
---
# tasks/main.yaml
nginx_task_manager:
- install
- config
- service
nginx_file_include_dir_dest: /etc/nginx/conf.d/
nginx_file_include_dir_group: root
nginx_file_include_dir_mode: 0755

View File

@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Copy nginx configuration file.
- name: Copy nginx configuration file
become: true
copy:
dest: "{{ nginx_file_nginx_conf_dest }}"
src: "{{ nginx_file_nginx_conf_src }}"
@ -21,7 +22,8 @@
- Validate nginx
- Restart nginx
- name: Copy nginx custom configuration.
- name: Copy nginx custom configuration
become: true
copy:
dest: "{{ nginx_file_include_dir_dest }}"
group: "{{ nginx_file_include_dir_group }}"

View File

@ -13,6 +13,7 @@
# under the License.
---
- name: Install nginx from package
become: true
package:
name: "{{ nginx_package_name }}"
state: present

View File

@ -1,15 +0,0 @@
# Copyright 2015 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
---

View File

@ -12,14 +12,10 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Include OS-specific variables.
- name: Include OS-specific variables
include_vars: "{{ ansible_os_family }}.yaml"
- include: install.yaml
become: yes
- include: config.yaml
become: yes
- include: service.yaml
become: yes
- include: "{{ nginx_task }}.yaml"
with_items: "{{ nginx_task_manager }}"
loop_control:
loop_var: nginx_task

View File

@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
---
- name: Enable nginx service.
- name: Enable nginx service
become: true
service:
enabled: yes
name: nginx