Guillaume Coré
2018-12-10 519007ebbc7c3cd8badf900276035e58c1f72d3c
Use default Cloudformation template in ocp4-coreos-deployer

This allows the creation of a dedicated subzone. This will facilitate the
installation of ocp4.

(idea) Also write down the Route53 User to the .aws/credentials file. This can be used
later when we know exactly what permission to grant the user in order for the
installation to work. That way the user belongs to the stack and gets deleted
when the stack is destroyed.
1 files deleted
2 files modified
475 ■■■■■ changed files
ansible/configs/ocp4-coreos-deployer/env_vars.yml 7 ●●●● patch | view | raw | blame | history
ansible/configs/ocp4-coreos-deployer/files/cloud_providers/ec2_cloud_template.j2 431 ●●●●● patch | view | raw | blame | history
ansible/configs/ocp4-coreos-deployer/post_infra.yml 37 ●●●●● patch | view | raw | blame | history
ansible/configs/ocp4-coreos-deployer/env_vars.yml
@@ -146,14 +146,17 @@
instances:
  - name: "workstation"
  - name: "clientvm"
    count: "{{num_users}}"
    unique: yes
    public_dns: true
    flavor:
      "ec2": "{{clientvm_instance_type}}"
    tags:
      - key: "AnsibleGroup"
        value: "bastions"
        value: "bastions,clientvms"
      - key: "ostype"
        value: "linux"
    rootfs_size: 30
    security_groups:
      - BastionSG
ansible/configs/ocp4-coreos-deployer/files/cloud_providers/ec2_cloud_template.j2
File was deleted
ansible/configs/ocp4-coreos-deployer/post_infra.yml
@@ -6,5 +6,38 @@
  - step002
  - post_infrastructure
  tasks:
  - debug:
      msg: "Step 002 Post Infrastructure - Dummy action"
    - name: get Route53User credentials from stack outputs
      set_fact:
        route53user: "{{ cloudformation_out_final.stack_outputs.Route53User }}"
        route53user_access_key: "{{ cloudformation_out_final.stack_outputs.Route53UserAccessKey }}"
        route53user_secret_access_key: "{{ cloudformation_out_final.stack_outputs.Route53UserSecretAccessKey }}"
      when:
        - cloudformation_out_final is defined
        - cloudformation_out_final.stack_outputs.Route53UserAccessKey is defined
        - cloudformation_out_final.stack_outputs.Route53UserSecretAccessKey is defined
      tags:
        - provision_cf_template
- name: Step 002 Post Infrastructure clientvm
  hosts: clientvms
  become: false
  tags:
  - step002
  - post_infrastructure
  tasks:
    - name: Create .aws for awscli
      file:
        path: ~/.aws
        mode: 0700
        state: directory
    - name: Write down Route53User credentials
      blockinfile:
        dest: "~/.aws/credentials"
        create: yes
        content: |
          [route53]
          # {{ hostvars.localhost.route53user }}
          aws_access_key_id={{ hostvars.localhost.route53user_access_key }}
          aws_secret_access_key={{ hostvars.localhost.route53user_secret_access_key }}
      when: hostvars.localhost.route53user_access_key is defined