spot / spot.cloud_modules / 1.3.3 / module / aws_mrscaler Create, update or delete Spot MRScaler | "added in version" 1.0.0 of spot.cloud_modules" Authors: Spot by NetApp (@jeffnoehren)spot.cloud_modules.aws_mrscaler (1.3.3) — module
Install with ansible-galaxy collection install spot.cloud_modules:==1.3.3
collections: - name: spot.cloud_modules version: 1.3.3
Can create, update, or delete Spotinst MrScaler You will have to have a credentials file in this location - <home>/.spotinst/credentials The credentials file must contain a row that looks like this token = <YOUR TOKEN> Full documentation available at U(https://help.spotinst.com/hc/en-us/articles/115003530285-Ansible-)
#Create an EMR Cluster - hosts: localhost tasks: - name: create emr aws_mrscaler: account_id: YOUR_ACCOUNT_ID token: YOUR_SPOTINST_TOKEN state: present name: ansible_test_group description: this is from ansible region: us-west-2 strategy: new: release_label: emr-5.17.0 provisioning_timeout: timeout: 15 timeout_action: terminate compute: availability_zones: - name: us-west-2b subnet_id: instance_groups: master_group: instance_types: - m3.xlarge target: 1 life_cycle: ON_DEMAND core_group: instance_types: - m3.xlarge target: 1 life_cycle: SPOT task_group: instance_types: - m3.xlarge capacity: minimum: 0 maximum: 0 target: 0 life_cycle: SPOT emr_managed_master_security_group: sg-1234567 emr_managed_slave_security_group: sg-1234567 additional_master_security_groups: sg-1234567 - sg-1234567 additional_slave_security_groups: - sg-1234567 ec2_key_name: Noam-key applications: - name: Ganglia version: "1.0" - name: Hadoop cluster: visible_to_all_users: true termination_protected: false keep_job_flow_alive_when_no_steps: true log_uri: s3://job-status additional_info: "{'test':'more information'}" job_flow_role: EMR_EC2_DefaultRole security_configuration: test register: result - debug: var=result
id: description: - (String) The group id if it already exists and you want to update, or delete it. This will not work unless the uniqueness_by field is set to id. When this is set, and the uniqueness_by field is set, the group will either be updated or deleted, but not created. name: description: - Name for EMR cluster required: true type: str state: choices: - present - absent default: present description: - create update or delete type: str token: description: - Spotinst API Token type: str region: description: - Region to deploy EMR cluster instance Groups required: true type: str cluster: description: - Schema that contains cluster parameters type: dict compute: description: - Schema that contains instance groups and other important resource parameters type: dict scaling: description: - Lists of up and down scaling policies type: dict strategy: description: - Choose to create new cluster, clone an existing cluster or wrap an existing cluster type: dict account_id: description: - Optional parameter that allows to set an account-id inside the module configuration. By default this is retrieved from the credentials path required: false type: str scheduling: description: - List of Scheduled tasks to perform type: dict description: description: - Description of EMR cluster required: false type: str uniqueness_by: choices: - id - name default: name description: - If set to id an id must be provided, if name no id is needed required: false type: str credentials_path: default: /root/.spotinst/credentials description: - Optional parameter that allows to set a non-default credentials path. required: false type: str
result: description: Created EMR Cluster successfully. returned: success sample: simrs-35124875 type: str