--- # Copyright Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. - name: Generate SSH keys for accessing OCP cluster community.crypto.openssh_keypair: comment: "cifmw generated key for ocp access" path: >- {{ cifmw_devscripts_artifacts_dir }}/cifmw_ocp_access_key type: "ecdsa" register: cifmw_devscripts_ssh_key - name: Gather the SSH public key for enabling cluster access. vars: pub_key: ssh_pub_key: "{{ cifmw_devscripts_ssh_key.public_key }}" ansible.builtin.set_fact: cifmw_devscripts_config: >- {{ cifmw_devscripts_config | combine(pub_key, recursive=true) }} - name: Copy the configuration file. ansible.builtin.template: src: templates/conf_ciuser.j2 dest: >- {{ cifmw_devscripts_repo_dir }}/config_{{ cifmw_devscripts_user }}.sh mode: "0644"