use openssh_keypair, fixing typo, merge with upstream redhat-cop (#609)
* add become: true to workload.yml for some tasks
add become: true to :
- Generate a brand new SSH key on MASTER that will be used also by APB container (provision.yml)
- add new ssh-key as authorized on BASTION host
* use openssh_keypair to generate ssh key instead of shell
* fixing typo
| | |
| | | path: /opt/apb/id_rsa |
| | | state: directory |
| | | mode: '0755' |
| | | become: true |
| | | |
| | | - name: Generate a brand new SSH key on MASTER that will be used also by APB container (provision.yml) |
| | | shell: "ssh-keygen -N '' -f /opt/apb/id_rsa" |
| | | openssh_keypair: |
| | | path: /opt/apb/id_ssh_rsa |
| | | force: yes |
| | | become: true |
| | | |
| | | #- name: Generate a brand new SSH key on MASTER that will be used also by APB container (provision.yml) |
| | | # shell: "ssh-keygen -N '' -f /opt/apb/id_rsa" |
| | | # become: true |
| | | |
| | | - name: add new ssh-key as authorized on BASTION host |
| | | shell: "cat /opt/apb/id_rsa | ssh -i /root/.ssh/milan-fa8ckey.pem ec2-user@bastion 'cat >> .ssh/authorized_keys'" |
| | | become: true |