summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Uiterwijk <puiterwijk@redhat.com>2017-04-09 22:34:55 +0000
committerPatrick Uiterwijk <puiterwijk@redhat.com>2017-04-09 22:34:55 +0000
commit7ce0b12a42c6766c746f0a90076c7b98b7848603 (patch)
tree9b0fb84d8db819d0a6dc733d32541fbbb82a4a22
parentc96d44b2328696768d0538449c9288f1ea83b11f (diff)
downloadansible-7ce0b12a42c6766c746f0a90076c7b98b7848603.tar.gz
ansible-7ce0b12a42c6766c746f0a90076c7b98b7848603.tar.xz
ansible-7ce0b12a42c6766c746f0a90076c7b98b7848603.zip
Fix env tests
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
-rw-r--r--roles/base/tasks/sshcerts.yml20
1 files changed, 10 insertions, 10 deletions
diff --git a/roles/base/tasks/sshcerts.yml b/roles/base/tasks/sshcerts.yml
index d22af0cc2..cc28c9278 100644
--- a/roles/base/tasks/sshcerts.yml
+++ b/roles/base/tasks/sshcerts.yml
@@ -3,7 +3,7 @@
file_type=file
patterns="ssh_host_*_key"
register: ssh_key_files
- when: "env == 'staging'"
+ when: env == "staging"
tags:
- sshd_config
- config
@@ -14,7 +14,7 @@
stat: path="{{item.path}}-cert.pub"
with_items: "{{ssh_key_files.files}}"
register: ssh_cert_files
- when: "env == 'staging'"
+ when: env == "staging"
tags:
- sshd_config
- config
@@ -24,7 +24,7 @@
- name: Set lists of certs to sign to empty
set_fact:
certs_to_sign: "[]"
- when: "env == 'staging'"
+ when: env == "staging"
tags:
- sshd_config
- config
@@ -35,7 +35,7 @@
set_fact:
certs_to_sign: "{{certs_to_sign}} + [ '{{item.item.path}}' ]"
with_items: "{{ssh_cert_files.results}}"
- when: "env == 'staging' and not item.stat.exists"
+ when: env == "staging" and not item.stat.exists
tags:
- sshd_config
- config
@@ -49,7 +49,7 @@
delegate_to: "batcave01.phx2.fedoraproject.org"
run_once: true
register: pubkeydirout
- when: "env == 'staging' and {{certs_to_sign}} != []"
+ when: env == "staging" and certs_to_sign != []
tags:
- sshd_config
- config
@@ -58,7 +58,7 @@
- set_fact:
pubkeydir: "{{pubkeydirout.stdout}}"
- when: "env == 'staging' and {{certs_to_sign}} != []"
+ when: env == "staging" and certs_to_sign != []
tags:
- sshd_config
- config
@@ -70,7 +70,7 @@
dest="{{pubkeydir}}"
fail_on_missing=true
with_items: "{{certs_to_sign}}"
- when: "env == 'staging'"
+ when: env == "staging"
tags:
- sshd_config
- config
@@ -81,7 +81,7 @@
set_fact:
sign_hostnames: "{{inventory_hostname}}"
sign_validity: "-1h:+2w"
- when: "env == 'staging'"
+ when: env == "staging"
tags:
- sshd_config
- config
@@ -93,7 +93,7 @@
command: "ssh-keygen -s {{private}}/files/ssh/staging_ca_host_key -I {{inventory_hostname}} -h -n {{ sign_hostnames }} -V {{sign_validity}} -z {{ansible_date_time.epoch}} {{pubkeydir}}/{{inventory_hostname}}{{item}}.pub"
delegate_to: "batcave01.phx2.fedoraproject.org"
with_items: "{{certs_to_sign}}"
- when: "env == 'staging'"
+ when: env == "staging"
tags:
- sshd_config
- config
@@ -104,7 +104,7 @@
copy: src="{{pubkeydir}}/{{inventory_hostname}}{{item}}-cert.pub"
dest="{{item}}-cert.pub"
with_items: "{{certs_to_sign}}"
- when: "env == 'staging'"
+ when: env == "staging"
notify:
- restart sshd
tags: