<commit_before>- name: provision aws resources
  hosts: localhost
  vars:
    elb_name: telemetry-ecs
    command: scheduler

  tasks:
    - name: create bucket
      s3: bucket={{airflow_bucket}} region={{region}} mode=create

    - name: copy EMR bootstrap script
      s3: bucket={{airflow_bucket}} region={{region}} object=steps/airflow.sh src=ansible/files/spark/airflow.sh mode=put

    - name: create load balancer
      ec2_elb_lb:
        name: "{{ elb_name }}"
        region: "{{ region }}"
        state: present
        security_group_names: "{{ elb_sg_name }}"
        subnets:
          - "{{ ecs_vpc_subnet_id }}"
        listeners:
          - protocol: https
            load_balancer_port: 443
            instance_protocol: http
            instance_port: 8080
            ssl_certificate_id: "{{ ssl_cert_id }}"
          - protocol: http
            load_balancer_port: 80
            instance_port: 8080
        health_check:
          ping_protocol: tcp
          ping_port: 8080
          response_timeout: 50 # seconds
          interval: 60 # seconds
          unhealthy_threshold: 2
          healthy_threshold: 2

    - name: fetch SMTP credentials
      s3: bucket={{metadata_bucket}} region={{region}} object=smtp_ses/credentials.json mode=getstr
      register: smtp_credentials_json

    - set_fact:
      smtp_credentials: "{{ smtp_credentials_json.contents|from_json }}"

    - name: create task definition
      shell: "{{ item }}"
      with_items:
        - ecs-cli configure --cluster {{ ecs_cluster_name }}
        - ecs-cli compose --project-name telemetry-airflow --file ansible/files/docker-compose.yml create
      environment:
        AWS_REGION: "{{ region }}"
        EMR_KEY_NAME: "{{ emr_key_name }}"
        EMR_RELEASE_LABEL: "{{ emr_release_label }}"<commit_msg>Fix indentation<commit_after>- name: provision aws resources
  hosts: localhost
  vars:
    elb_name: telemetry-ecs
    command: scheduler

  tasks:
    - name: create bucket
      s3: bucket={{airflow_bucket}} region={{region}} mode=create

    - name: copy EMR bootstrap script
      s3: bucket={{airflow_bucket}} region={{region}} object=steps/airflow.sh src=ansible/files/spark/airflow.sh mode=put

    - name: create load balancer
      ec2_elb_lb:
        name: "{{ elb_name }}"
        region: "{{ region }}"
        state: present
        security_group_names: "{{ elb_sg_name }}"
        subnets:
          - "{{ ecs_vpc_subnet_id }}"
        listeners:
          - protocol: https
            load_balancer_port: 443
            instance_protocol: http
            instance_port: 8080
            ssl_certificate_id: "{{ ssl_cert_id }}"
          - protocol: http
            load_balancer_port: 80
            instance_port: 8080
        health_check:
          ping_protocol: tcp
          ping_port: 8080
          response_timeout: 50 # seconds
          interval: 60 # seconds
          unhealthy_threshold: 2
          healthy_threshold: 2

    - name: fetch SMTP credentials
      s3: bucket={{metadata_bucket}} region={{region}} object=smtp_ses/credentials.json mode=getstr
      register: smtp_credentials_json

    - set_fact:
        smtp_credentials: "{{ smtp_credentials_json.contents|from_json }}"

    - name: create task definition
      shell: "{{ item }}"
      with_items:
        - ecs-cli configure --cluster {{ ecs_cluster_name }}
        - ecs-cli compose --project-name telemetry-airflow --file ansible/files/docker-compose.yml create
      environment:
        AWS_REGION: "{{ region }}"
        EMR_KEY_NAME: "{{ emr_key_name }}"
        EMR_RELEASE_LABEL: "{{ emr_release_label }}"
{'fraction_non_alphanumeric': 0.10297356828193832, 'fraction_numerical': 0.01486784140969163, 'mean_word_length': 2.33302752293578, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7210816', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1108, 'n_words': 235}