Skip to content

Instantly share code, notes, and snippets.

@waltervargas
Created July 28, 2014 08:01
Show Gist options
  • Save waltervargas/4e8afb1d02525bcad907 to your computer and use it in GitHub Desktop.
Save waltervargas/4e8afb1d02525bcad907 to your computer and use it in GitHub Desktop.
ansible task for copy ssl certs to Debian
- name: Install SSL Certs
copy: src={{ item.src }} dest={{ item.dest }} owner=root group={{ item.group }} mode={{ item.mode }}
with_items:
- { src: server.crt, dest: /etc/ssl/certs, mode: 644 , group: root }
- { src: server.key, dest: /etc/ssl/private, mode: 640, group: ssl-cert }
@overdrive3000
Copy link

I did my own


- name: Deploy SSL certificates
  copy:
    src: "{{ item['ssl_certificate_file'] }}"
    dest: /etc/ssl/certs/{{ item['ssl_certificate_file'] | basename }}
    owner: root
    group: root
    mode: 644
  with_items: vhosts
  when: item['ssl_certificate_file'] != "ssl-cert-snakeoil.pem"

- name: Deploy SSL key certificates
  copy:
    src: "{{ item['ssl_certificate_key'] }}"
    dest: /etc/ssl/private/{{ item['ssl_certificate_key'] | basename }}
    owner: root
    group: root
    mode: 640
  with_items: vhosts
  when: item['ssl_certificate_key'] != "ssl-cert-snakeoil.key"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment