From 4486bddb195c33c7221e2ea003b48136012d06ca Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Wed, 14 Jun 2017 18:00:30 +0200 Subject: [PATCH] Add blank lines, spaces... (readability) --- tests/includes/pre_Debian.yml | 4 ++++ tests/test.yml | 30 ++++++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/tests/includes/pre_Debian.yml b/tests/includes/pre_Debian.yml index e15fb45..f07d51b 100644 --- a/tests/includes/pre_Debian.yml +++ b/tests/includes/pre_Debian.yml @@ -4,14 +4,18 @@ apt_repository: repo='deb http://httpredir.debian.org/debian {{ ansible_distribution_release }}-backports main' state=present - block: + - name: APT | Install DotDeb key apt_key: url='http://www.dotdeb.org/dotdeb.gpg' state=present + - name: APT_REPOSITORY | Install dotdeb (PHP 7) apt_repository: repo='deb http://packages.dotdeb.org {{ ansible_distribution_release }} all' state=present + - name: LINEFILEFILE | Dotdeb priority (prevent install nginx from dotdeb) copy: > content="Package: *\nPin: release o=packages.dotdeb.org\nPin-Priority: 100" dest=/etc/apt/preferences + when: ansible_distribution_release == 'jessie' and dotdeb - name: APT | Install needed packages diff --git a/tests/test.yml b/tests/test.yml index 59bd274..6ec3233 100644 --- a/tests/test.yml +++ b/tests/test.yml @@ -14,6 +14,7 @@ copy: src=file/test.crt dest={{ int_ansible_ssl_dir }}/test.crt - name: COPY | Deploy test key copy: src=file/test.key dest={{ int_ansible_ssl_dir }}/test.key + vars: # Internal vars int_ansible_ssl_dir: '/etc/ansible-ssl' @@ -238,19 +239,32 @@ # -------------------------------- - name: INCLUDE | Post_tasks related to OS version include: "includes/post_{{ ansible_distribution }}.yml" + # -------------------------------- # Deploy index files # -------------------------------- - name: -- Add PHP file -- copy: dest="{{ nginx_root }}/{{ item }}/public/index.php" content=" vdefault.stdout.find('Index HTML test OK') == -1 or vdefault.stderr.find('X-ansible-default') == -1 + - name: -- VERIFY DEFAULT SSL SITE -- command: "curl --insecure -v https://127.0.0.1/" changed_when: false @@ -411,16 +434,19 @@ failed_when: > defaultssl.stdout.find('Index HTML test OK') == -1 or defaultssl.stderr.find('X-ansible-default') == -1 + - name: -- VERIFY NOT DEFAULT SITE -- command: "curl -v -H 'Host: test-php.local' http://127.0.0.1/" changed_when: false register: vphp failed_when: vphp.stderr.find('X-ansible-default') != -1 + - name: -- VERIFY NOT DEFAULT SSL SITE -- command: "curl --insecure -v -H 'Host: test-ssl.local' https://127.0.0.1/" changed_when: false register: notdefaultssl failed_when: notdefaultssl.stderr.find('X-ansible-default') != -1 + - name: -- VERIFY DEFAULT SITE + STUB_STATUS -- command: "curl -v http://127.0.0.1/status" changed_when: false