diff options
| author | Ralph Bean <rbean@redhat.com> | 2014-12-08 14:51:28 +0000 |
|---|---|---|
| committer | Ralph Bean <rbean@redhat.com> | 2014-12-08 14:51:33 +0000 |
| commit | ba3afd0da33d221026b8d2687504f96efadb6c2a (patch) | |
| tree | 7f45b1567a191751dd20e230425174573b2d510c /roles/httpd/certificate/tasks | |
| parent | 1af3349e63d657898b21c0d59374289fed28207c (diff) | |
| download | ansible-ba3afd0da33d221026b8d2687504f96efadb6c2a.tar.gz ansible-ba3afd0da33d221026b8d2687504f96efadb6c2a.tar.xz ansible-ba3afd0da33d221026b8d2687504f96efadb6c2a.zip | |
mod_ssl and certificates, first try.
Diffstat (limited to 'roles/httpd/certificate/tasks')
| -rw-r--r-- | roles/httpd/certificate/tasks/main.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/roles/httpd/certificate/tasks/main.yml b/roles/httpd/certificate/tasks/main.yml new file mode 100644 index 000000000..4d892ff79 --- /dev/null +++ b/roles/httpd/certificate/tasks/main.yml @@ -0,0 +1,51 @@ +# Expected vars +# - name... +# - SSLCertificateChainFile: +# - cert: +# - key: + +- name: Copy over SSLCertificateChainFile if defined + copy: > + src={{private}}/httpd/{{SSLCertificateChainFile}} + dest=/etc/pki/tls/certs/{{SSLCertificateChainFile}} + owner=root + group=root + mode=0644 + when: SSLCertificateChainFile is defined + notify: + - restart httpd + tags: + - httpd + - httpd/certificate + +- name: Copy {{name}}.cert + copy: > + src={{item}} + dest=/etc/pki/tls/certs/{{item}} + owner=root + group=root + mode=0644 + with_first_found: + - {{private}}/httpd/{{name}}.cert + - {{cert}} + notify: + - restart httpd + tags: + - httpd + - httpd/certificate + +- name: Copy {{name}}.key + copy: > + src={{item}} + dest=/etc/pki/tls/private/{{item}} + owner=root + group=root + mode=0600 + with_first_found: + - {{private}}/httpd/{{name}}.key + - {{key}} + notify: + - restart httpd + tags: + - httpd + - httpd/certificate |
