Michele Naldini
2019-08-19 28b6cdfbbada5e2e29acd3afe80afdde532c7481
fixed conflict files  (#599)

* generate new ssh key file inside provision.yml

* generate new ssh key on master; authorizing on bastion as ec2-users; use it inside apb containers

* update workload.yml to create a directory if it does not exist

Create a directory if it does not exist

* generate new ssh key on master; authorizing on bastion as ec2-users; use it inside apb containers

* update workload.yml to create a directory if it does not exist

Create a directory if it does not exist
2 files modified
11 ■■■■ changed files
ansible/roles/ocp-workload-edge-deployments/files/deploy-containers-apb/playbooks/provision.yml 4 ●●●● patch | view | raw | blame | history
ansible/roles/ocp-workload-edge-deployments/tasks/workload.yml 7 ●●●● patch | view | raw | blame | history
ansible/roles/ocp-workload-edge-deployments/files/deploy-containers-apb/playbooks/provision.yml
@@ -15,8 +15,8 @@
      state: directory
      mode: 0700
  
  - name: Generate a brand new SSH key
    shell: "ssh-keygen -N '' -f /opt/apb/id_rsa"
  #- name: Generate a brand new SSH key
  #  shell: "ssh-keygen -N '' -f /opt/apb/id_rsa"
  - name: Copy the pre-generated master private key in .ssh dir
    shell: cp /opt/apb/id_rsa /opt/apb/.ssh/
ansible/roles/ocp-workload-edge-deployments/tasks/workload.yml
@@ -5,12 +5,17 @@
  debug:
    msg: "Setting up workload for user ocp_username = {{ ocp_username }}"
- name: Create a directory if it does not exist
  file:
    path: /opt/apb/id_rsa
    state: directory
    mode: '0755'
- 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"
- 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'
  shell: "cat /opt/apb/id_rsa | ssh -i /root/.ssh/milan-fa8ckey.pem ec2-user@bastion 'cat >> .ssh/authorized_keys'"
- name: Create project for IoT Development
  shell: "oc new-project iot-development"