Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pki steps are being skipped for docker causing following steps to fail #75

Open
littlealex003 opened this issue Jul 10, 2020 · 1 comment
Assignees

Comments

@littlealex003
Copy link

I'm trying to get these scripts working on docker containers instead of vms and getting somewhere (slowly, testing is not a fast turnaround), hung up here now in buildserver/roles/pki/tasks/main.yml (lines 65 to 92):

`- name: decrypt server certificate
when: ansible_virtualization_type != "docker"
environment:
P12_PASSWORD: "{{ p12_password | default('p12_password') }}"
shell: 'openssl pkcs12
-in /etc/pki/tls/private/server.p12
-nodes -nokeys
-passin env:P12_PASSWORD > /etc/pki/tls/certs/tmp.cer'
changed_when: yes

  • name: decrypt server key
    when: ansible_virtualization_type != "docker"
    environment:
    P12_PASSWORD: "{{ p12_password | default('p12_password') }}"
    shell: 'openssl pkcs12
    -in /etc/pki/tls/private/server.p12
    -nodes -nocerts
    -passin env:P12_PASSWORD > /etc/pki/tls/private/tmp.key'
    changed_when: yes

  • name: validate moludus of certificate to moludus of key
    shell: 'set -o pipefail && (openssl x509 -noout -modulus -in /etc/pki/tls/certs/tmp.cer | openssl md5 ;
    openssl rsa -noout -modulus -in /etc/pki/tls/private/tmp.key | openssl md5) |
    uniq | wc -l'
    changed_when: no
    register: checksums
    tags:

    • ssl_verify`

As you can see these tasks specifically don't run for docker, any reason why? I'm pretty sure either they need to run or the following check of the generated file needs to be removed!

@bbaassssiiee
Copy link
Owner

Please create a pull-request with this line removed from the action named decrypt server key:

when: ansible_virtualization_type != "docker"

Don't forget to register on https://hacktoberfest.digitalocean.com to earn a T-shirt

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

No branches or pull requests

2 participants