![Marc Gariepy](/assets/img/avatar_default.png)
the default config needs to be removed after the pkg is installed. Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/766030 Change-Id: Ibb9ccd8b85f673103f3ce863a8eb0641ebb056fb
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
---
|
|
# Copyright 2016, Rackspace US, 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.
|
|
|
|
- name: Enable git automatic thread count detection
|
|
git_config:
|
|
scope: system
|
|
name: pack.threads
|
|
value: '0'
|
|
|
|
- name: Remove old key file(s) if found
|
|
file:
|
|
path: "{{ item }}"
|
|
state: "absent"
|
|
with_items:
|
|
- "{{ repo_service_home_folder }}/.ssh/authorized_keys"
|
|
- "{{ repo_service_home_folder }}/.ssh/id_rsa"
|
|
- "{{ repo_service_home_folder }}/.ssh/id_rsa.pub"
|
|
when: repo_recreate_keys | bool
|
|
|
|
- name: Generate the nginx system user ssh key
|
|
user:
|
|
name: "{{ repo_service_user_name }}"
|
|
generate_ssh_key: "yes"
|
|
|
|
- name: Enable SSHD
|
|
systemd:
|
|
name: "{{ repo_server_sshd }}"
|
|
state: started
|
|
enabled: yes
|
|
masked: no
|
|
daemon_reload: yes
|
|
|
|
- name: Remove default nginx file
|
|
file:
|
|
path: "{{ item.path }}"
|
|
state: "{{ item.state | default('absent') }}"
|
|
with_items:
|
|
- path: "/etc/nginx/sites-enabled/default"
|
|
notify:
|
|
- reload nginx
|
|
|
|
- name: Drop NGINX configuration files
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
with_items:
|
|
- src: "nginx.conf.j2"
|
|
dest: "/etc/nginx/nginx.conf"
|
|
- src: "openstack-slushee.vhost.j2"
|
|
dest: "/etc/nginx/sites-available/openstack-slushee.vhost"
|
|
notify:
|
|
- reload nginx
|
|
- reload lsyncd
|
|
|
|
- name: Drop rsyncd configuration file
|
|
template:
|
|
src: "rsyncd.conf.j2"
|
|
dest: "/etc/rsyncd.conf"
|
|
notify:
|
|
- reload rsyncd
|
|
|
|
|
|
- name: Enable openstack-slushee site
|
|
file:
|
|
src: "/etc/nginx/sites-available/openstack-slushee.vhost"
|
|
dest: "/etc/nginx/sites-enabled/openstack-slushee.vhost"
|
|
state: "link"
|
|
notify:
|
|
- reload nginx
|