Merge branch 'unstable' into stable
This commit is contained in:
commit
fbd4e741a0
|
@ -1,20 +1,22 @@
|
|||
---
|
||||
|
||||
- name: Create default security group
|
||||
ec2_group:
|
||||
name: "{{ec2_security_group.name}}"
|
||||
name: "{{ ec2_security_group.name }}"
|
||||
state: present
|
||||
aws_access_key: "{{aws_access_key}}"
|
||||
aws_secret_key: "{{aws_secret_key}}"
|
||||
region: "{{aws_region}}"
|
||||
description: "{{ec2_security_group.description}}"
|
||||
rules: "{{ec2_security_group.rules}}"
|
||||
aws_access_key: "{{ aws_access_key }}"
|
||||
aws_secret_key: "{{ aws_secret_key }}"
|
||||
region: "{{ aws_region }}"
|
||||
description: "{{ ec2_security_group.description }}"
|
||||
rules: "{{ ec2_security_group.rules }}"
|
||||
rules_egress: "{{ ec2_security_group.rules_egress }}"
|
||||
|
||||
- name: Create key pair
|
||||
ec2_key:
|
||||
name: "{{ec2_keyname}}"
|
||||
name: "{{ ec2_keyname }}"
|
||||
state: present
|
||||
aws_access_key: "{{aws_access_key}}"
|
||||
aws_secret_key: "{{aws_secret_key}}"
|
||||
region: "{{aws_region}}"
|
||||
key_material: "{{item}}"
|
||||
with_file: "{{ssh_pubkey_file}}"
|
||||
aws_access_key: "{{ aws_access_key }}"
|
||||
aws_secret_key: "{{ aws_secret_key }}"
|
||||
region: "{{ aws_region }}"
|
||||
key_material: "{{ item }}"
|
||||
with_file: "{{ ssh_pubkey_file }}"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
|
||||
- fail:
|
||||
- name: "Compatibility check"
|
||||
fail:
|
||||
msg: only compatible with Debian >= 8
|
||||
when:
|
||||
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<')
|
||||
|
|
|
@ -50,10 +50,10 @@ sed_cert_path_for_apache() {
|
|||
local search="^SSLCertificateFile.*$"
|
||||
local replace="SSLCertificateFile ${cert_path}"
|
||||
|
||||
if ! $(grep -qE "${search}" "${vhost_full_path}"); then
|
||||
if grep -qE "${search}" "${vhost_full_path}"; then
|
||||
[ -w "${vhost_full_path}" ] || error "File ${vhost_full_path} is not writable"
|
||||
|
||||
sed -i "s~^${search}~${replace}~" "${vhost_full_path}"
|
||||
sed -i "s~${search}~${replace}~" "${vhost_full_path}"
|
||||
debug "Config in ${vhost_full_path} has been updated"
|
||||
$(command -v apache2ctl) -t
|
||||
fi
|
||||
|
@ -68,7 +68,7 @@ sed_cert_path_for_nginx() {
|
|||
local search="^ssl_certificate[^_].*$"
|
||||
local replace="ssl_certificate ${cert_path};"
|
||||
|
||||
if ! $(grep -qE "${search}" "${vhost_full_path}"); then
|
||||
if grep -qE "${search}" "${vhost_full_path}"; then
|
||||
[ -w "${vhost_full_path}" ] || error "File ${vhost_full_path} is not writable"
|
||||
|
||||
sed -i "s~${search}~${replace}~" "${vhost_full_path}"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
|
||||
- fail:
|
||||
- name: "Compatibility check"
|
||||
fail:
|
||||
msg: only compatible with Debian >= 8
|
||||
when:
|
||||
- ansible_distribution != "Debian" or ansible_distribution_major_version | version_compare('8', '<')
|
||||
|
|
Loading…
Reference in a new issue