| |
@@ -4,6 +4,7 @@
|
| |
gather_facts: False
|
| |
vars:
|
| |
app: docstranslation
|
| |
+ ssh_key_path: "{{ private }}/files/docstranslation/id_rsa_docstrans_{{ env_short }}"
|
| |
vars_files:
|
| |
- /srv/web/infra/ansible/vars/global.yml
|
| |
- "/srv/private/ansible/vars.yml"
|
| |
@@ -23,19 +24,6 @@
|
| |
tags:
|
| |
- apply-appowners
|
| |
|
| |
- - name: Generate ssh keypair, if none exist
|
| |
- openssh_keypair:
|
| |
- path: "/etc/openshift_apps/{{ app }}/id_rsa_docs_trans"
|
| |
- mode: "600"
|
| |
- type: rsa
|
| |
- size: 4096
|
| |
- register: r_ssh_key
|
| |
-
|
| |
- - name: Retrieve ssh priv key
|
| |
- slurp:
|
| |
- path: r_ssh_key.filename
|
| |
- register: r_docs_priv_key
|
| |
-
|
| |
- name: Define imagestream
|
| |
include_role:
|
| |
name: openshift/imagestream
|
| |
@@ -47,7 +35,7 @@
|
| |
name: openshift/object
|
| |
vars:
|
| |
objectname: buildconfig.yml
|
| |
- file: buildconfig.yml
|
| |
+ template: buildconfig.yml
|
| |
|
| |
- name: Start build
|
| |
include_role:
|
| |
@@ -68,7 +56,7 @@
|
| |
include_role:
|
| |
name: openshift/object
|
| |
vars:
|
| |
- file: cron.yml
|
| |
+ template: cron.yml
|
| |
objectname: cron.yml
|
| |
tags:
|
| |
- deploy-cronjob
|
| |
@@ -86,8 +74,3 @@
|
| |
tags:
|
| |
- never
|
| |
- delete
|
| |
-
|
| |
- post_tasks:
|
| |
- - name: Display git ssh key for adding in pagure
|
| |
- debug:
|
| |
- msg: "{{ r_ssh_key.public_key }}"
|
| |
Ok, let's try this again.
The ssh key is now moved to /srv/private/ansible/id_rsa_docstrans_[prod|stg] on batcave.
For production, I intend to reuse the ssh key from sundries, but otherwise the play will handle creating a new keypair.
Hopefully, that should solve our previous issues.