I have a role for installing ssl certificates.

I also have a playbook for installing an instance of mailman with various 
vhosts.  One such host like this:

host_vars/mailman.unixathome.org:
---
  mailman_vhosts:
  - vhost: lists.freebsddiary.org
  - vhost: lists.freshsource.org
  .... etc

I would like to install an ssl-certificate for each vhost and I already 
have a role which does that (see below).


I'm not quite sure how to invoke one task within another task.  Is this a 
sign I'm doing it wrong?

FYI:
roles/ssl-certificates/tasks/main.yml
---
  - name: certs
    # see also roles/ssl-certificates/vars/main.yml for definitions of the 
following
    copy: src={{item.path}}  dest=/usr/local/etc/ssl/ owner=root group=www 
mode={{item.mode}}  backup=yes
    with_items: certs
    tags: ssl-cert

roles/ssl-certificates/defaults/main.yml:
---
    # see also roles/logstash-forwarder/defaults/main.yml
    cert_name:  "{{ inventory_hostname }}"
    cert_path:  "certificates/{{ cert_name }}/{{ cert_name }}.crt"
    key_path:   "certificates/{{ cert_name }}/{{ cert_name 
}}.nopassword.key"
    chain_path: "CA/StartSSL/intermediate.startssl.com.pem"
    ca_path:    "CA/StartSSL/root.startssl.com.pem"

    certs:
      - path: "{{ cert_path }}"
        mode: '644'
      - path: "{{ key_path }}"
        mode: '600'
      - path: "{{ chain_path }}"
        mode: '644'
      - path: "{{ ca_path }}"
        mode: '644'


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/0dd490d7-d448-461c-8249-194fd2b0a625%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to