tasks: Remove unused apache configuration

The barbican role is using uwsgi instead of Apache so remove
the playbooks related to Apache and SSL configuration.

Change-Id: I58a2f3ecbcd6de0cc0d345e9f6f1bb1027c22c92
This commit is contained in:
Markos Chandras 2017-11-23 10:24:14 +00:00
parent a0153f47ab
commit c43e5a435c
9 changed files with 0 additions and 260 deletions

View File

@ -1,73 +0,0 @@
---
# Copyright 2014, 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: Drop apache2 files
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
owner: "root"
group: "root"
with_items:
- { src: "barbican-ports.conf.j2", dest: "/etc/apache2/ports.conf" }
- { src: "barbican-httpd.conf.j2", dest: "/etc/apache2/sites-available/barbican-httpd.conf" }
notify:
- Restart Apache
- name: Disable default apache site
file:
path: "/etc/apache2/sites-enabled/000-default.conf"
state: "absent"
notify:
- Restart Apache
- name: Enable Barbican vhost
file:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
state: "{{ item.state }}"
with_items:
- { src: "/etc/apache2/sites-available/barbican-httpd.conf", dest: "/etc/apache2/sites-enabled/barbican-httpd.conf", state: "link" }
notify:
- Restart Apache
- name: Ensure Apache ServerName
lineinfile:
dest: "/etc/apache2/apache2.conf"
line: "ServerName {{ inventory_hostname }}"
notify:
- Restart Apache
- name: Ensure Apache ServerTokens
lineinfile:
dest: "/etc/apache2/conf-available/security.conf"
regexp: '^ServerTokens'
line: "ServerTokens {{ barbican_apache_servertokens }}"
notify:
- Restart Apache
- name: Ensure Apache ServerSignature
lineinfile:
dest: "/etc/apache2/conf-available/security.conf"
regexp: '^ServerSignature'
line: "ServerSignature {{ barbican_apache_serversignature }}"
notify:
- Restart Apache
- name: Enable/disable mod_ssl for apache2
apache2_module:
name: ssl
state: "{{ (barbican_ssl | bool) | ternary('present', 'absent') }}"
notify:
- Restart Apache

View File

@ -1,22 +0,0 @@
---
# Copyright 2015, 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.
- include: barbican_ssl_self_signed.yml
static: no
when:
- barbican_ssl | bool
- barbican_user_ssl_cert is not defined or barbican_user_ssl_key is not defined
- include: barbican_ssl_user_provided.yml

View File

@ -1,31 +0,0 @@
---
# Copyright 2015, 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: Remove self signed cert for regeneration
file:
dest: "{{ barbican_ssl_cert }}"
state: "absent"
when: barbican_ssl_self_signed_regen | bool
- name: Create self-signed Apache ssl cert
command: >
openssl req -new -nodes -sha256 -x509 -subj
"{{ barbican_ssl_self_signed_subject }}"
-days 3650
-keyout {{ barbican_ssl_key }}
-out {{ barbican_ssl_cert }}
-extensions v3_ca
creates={{ barbican_ssl_cert }}
notify: Restart Apache

View File

@ -1,32 +0,0 @@
---
# Copyright 2014, 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: Distribute self signed cert and key
memcached:
name: "{{ item.name }}"
file_path: "{{ item.src }}"
state: "retrieve"
file_mode: "{{ item.file_mode }}"
dir_mode: "{{ item.dir_mode }}"
server: "{{ memcached_servers }}"
encrypt_string: "{{ memcached_encryption_key }}"
with_items:
- { src: "{{ barbican_ssl_cert }}", name: "barbican_ssl_cert", file_mode: "0644", dir_mode: "0755" }
- { src: "{{ barbican_ssl_key }}", name: "barbican_ssl_key", file_mode: "0640", dir_mode: "0750" }
register: barbican_memcache_keys
until: barbican_memcache_keys |success
retries: 5
delay: 2
notify: Restart Apache

View File

@ -1,29 +0,0 @@
---
# Copyright 2015, 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: Store self signed cert and key
memcached:
name: "{{ item.name }}"
file_path: "{{ item.src }}"
state: "present"
server: "{{ memcached_servers }}"
encrypt_string: "{{ memcached_encryption_key }}"
with_items:
- { src: "{{ barbican_ssl_cert }}", name: "barbican_ssl_cert" }
- { src: "{{ barbican_ssl_key }}", name: "barbican_ssl_key" }
register: barbican_memcache_keys
until: barbican_memcache_keys |success
retries: 5
delay: 2

View File

@ -1,23 +0,0 @@
---
# Copyright 2015, 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.
- include: barbican_ssl_key_create.yml
when: inventory_hostname == groups['barbican_all'][0]
- include: barbican_ssl_key_store.yml
when: inventory_hostname == groups['barbican_all'][0]
- include: barbican_ssl_key_distribute.yml
when: inventory_hostname != groups['barbican_all'][0]

View File

@ -1,44 +0,0 @@
---
# Copyright 2015, 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: Drop user provided ssl cert
copy:
src: "{{ barbican_user_ssl_cert }}"
dest: "{{ barbican_ssl_cert }}"
owner: "root"
group: "root"
mode: "0644"
when: barbican_user_ssl_cert is defined
notify: Restart Apache
- name: Drop user provided ssl key
copy:
src: "{{ barbican_user_ssl_key }}"
dest: "{{ barbican_ssl_key }}"
owner: "root"
group: "root"
mode: "0640"
when: barbican_user_ssl_key is defined
notify: Restart Apache
- name: Drop user provided ssl CA cert
copy:
src: "{{ barbican_user_ssl_ca_cert }}"
dest: "{{ barbican_ssl_ca_cert }}"
owner: "root"
group: "root"
mode: "0644"
when: barbican_user_ssl_ca_cert is defined
notify: Restart Apache

View File

@ -13,9 +13,6 @@
# limitations under the License.
barbican_distro_packages:
- apache2
- apache2-utils
- libapache2-mod-wsgi
- python-dev
- libssl-dev
- libpq-dev

View File

@ -17,10 +17,7 @@ barbican_distro_packages:
- gcc-c++
- gettext
- git
- httpd
- httpd-tools
- libffi-devel
- mod_wsgi
- openssl-devel
- postgresql-libs
- python-devel