blob: 9f9227f60bb5db4fd9a84eeecbcce4d984190c21 [file] [log] [blame]
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you 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.
#
---
# Run the following setup once per server (each server can have one or more Django vhosts)
- hosts: django
tasks:
- group_by: key=django_{{ ansible_hostname }}
- hosts: django
name: webserver setup
roles:
- role: env_setup
when: inventory_hostname == groups['django_' + ansible_hostname][0]
# Oracle JDK is needed by Django apps that call Java code (e.g., SimCCS Maptool)
# - role: java
# when: inventory_hostname == groups['django_' + ansible_hostname][0] and ansible_os_family == "RedHat"
- role: httpd
when: inventory_hostname == groups['django_' + ansible_hostname][0]
- role: letsencrypt
when: inventory_hostname == groups['django_' + ansible_hostname][0]
- role: django_setup
when: inventory_hostname == groups['django_' + ansible_hostname][0]
# Create a django virtual host
- hosts: django
name: Create/update Django portal for gateway
roles:
- django
...