SSL Privacy Error on www Redirect to non-www

Considering this error you received:

The offending line appears to be:

      - canonical: cg-originals.com
      redirects:
      ^ here

I think you just need to indent your redirects two more spaces. Compare with the indentation of redirects in the error message suggestion:

example.com:
  site_hosts:
    - canonical: example.com
      redirects:
        - www.example.com

This complex YAML can be confusing. Check out http://docs.ansible.com/ansible/YAMLSyntax.html

# try this
wordpress_sites:
  cg-originals.com:
    site_hosts:
      - canonical: cg-originals.com
        redirects:
          - www.cg-originals.com

# conceptual representation of wordpress_sites
wordpress_sites:     <-- a dict
  example.com:       <-- a dict, an item in the wordpress_sites dict
    site_hosts:      <-- a list (because its items are preceded by dashes)
      - host_set_1   <-- a dict, an item in the site_hosts list

# conceptual representation of an item in site_hosts
host_set_1:          <-- a dict, an item in the site_hosts list
  canonical          <-- a simple variable, an item in host_set_1 dict
  redirects          <-- a list, an item in the host_set_1 dict
    - redirect_1     <-- a list item, an item in the redirects list
2 Likes