diff --git a/Cargo.lock b/Cargo.lock index 18b145be1..27e99f93c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1483,7 +1483,7 @@ dependencies = [ [[package]] name = "dock-node" -version = "0.24.0" +version = "0.25.0" dependencies = [ "async-trait", "beefy-gadget", @@ -1709,7 +1709,7 @@ dependencies = [ [[package]] name = "dock-runtime" -version = "0.24.0" +version = "0.25.0" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -10011,9 +10011,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f" dependencies = [ "ring", "untrusted", diff --git a/Dockerfile b/Dockerfile index 55079cecd..de29bbb61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,13 +15,13 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y # rustup directory ENV PATH /root/.cargo/bin:$PATH +ARG stable='stable-2023-03-09' ARG nightly='nightly-2023-03-09' -# setup rust nightly channel, pinning specific version as newer versions have a regression +# setup rust stable and nightly channels, pinning specific version as newer versions have a regression +RUN rustup install $stable RUN rustup install $nightly -RUN rustup install stable - # install wasm toolchain for substrate RUN rustup target add wasm32-unknown-unknown --toolchain $nightly @@ -45,11 +45,11 @@ ARG release RUN if [ "$release" = "Y" ] ; then \ echo 'Building in release mode.' ; \ - cargo +$nightly build --profile=release $features ; \ + WASM_BUILD_TOOLCHAIN=$nightly cargo +$stable build --profile=release $features ; \ mv /dock-node/target/release/dock-node /dock-node/target/; \ else \ echo 'Building in production mode.' ; \ - cargo +$nightly build --profile=production $features ; \ + WASM_BUILD_TOOLCHAIN=$nightly cargo +$stable build --profile=production $features ; \ mv /dock-node/target/production/dock-node /dock-node/target/; \ fi diff --git a/node/Cargo.toml b/node/Cargo.toml index d0b65ee5c..8cb2a132c 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -3,7 +3,7 @@ authors = ["Dock.io"] build = "build.rs" edition = "2021" name = "dock-node" -version = "0.24.0" +version = "0.25.0" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -28,7 +28,7 @@ optional = true [dependencies.dock-runtime] path = "../runtime" -version = "0.24.0" +version = "0.25.0" [dependencies.beefy-primitives] git = "https://github.com/paritytech/substrate.git" diff --git a/pallets/core/src/modules/accumulator/types.rs b/pallets/core/src/modules/accumulator/types.rs index fcc6dacd1..80aa43341 100644 --- a/pallets/core/src/modules/accumulator/types.rs +++ b/pallets/core/src/modules/accumulator/types.rs @@ -26,7 +26,6 @@ crate::impl_wrapper!(AccumulatorId([u8; 32]), with tests as acc_tests); /// Accumulator owner - DID with the ability to control given accumulator keys, params, etc. #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, Copy, Ord, PartialOrd, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[derive(scale_info_derive::TypeInfo)] #[scale_info(omit_prefix)] pub struct AccumulatorOwner(pub DidOrDidMethodKey); @@ -47,6 +46,7 @@ impl AuthorizeAction<(), DidMethodKey> for AccumulatorOwner {} MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -71,6 +71,7 @@ pub struct AccumulatorParameters { MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -88,6 +89,7 @@ pub struct AccumulatorPublicKey { Encode, Decode, scale_info_derive::TypeInfo, Clone, PartialEq, Eq, DebugNoBound, MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -110,6 +112,7 @@ pub enum Accumulator { MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -132,6 +135,7 @@ pub struct AccumulatorCommon { MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -185,6 +189,7 @@ impl Accumulator { scale_info_derive::TypeInfo, Encode, Decode, Clone, PartialEq, Eq, Debug, Default, MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[scale_info(omit_prefix)] pub struct StoredAccumulatorOwnerCounters { pub params_counter: IncId, @@ -195,6 +200,7 @@ pub struct StoredAccumulatorOwnerCounters { scale_info_derive::TypeInfo, Encode, Decode, Clone, PartialEq, Eq, Debug, MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) diff --git a/pallets/core/src/modules/attest/mod.rs b/pallets/core/src/modules/attest/mod.rs index 5baa54327..ed7af3773 100644 --- a/pallets/core/src/modules/attest/mod.rs +++ b/pallets/core/src/modules/attest/mod.rs @@ -53,6 +53,7 @@ crate::impl_wrapper!(Attester(DidOrDidMethodKey)); MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -70,6 +71,7 @@ pub struct Attestation { Encode, Decode, scale_info_derive::TypeInfo, Clone, PartialEq, Eq, DebugNoBound, Default, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) diff --git a/pallets/core/src/modules/blob/mod.rs b/pallets/core/src/modules/blob/mod.rs index 372f58a47..babc249cd 100644 --- a/pallets/core/src/modules/blob/mod.rs +++ b/pallets/core/src/modules/blob/mod.rs @@ -49,6 +49,7 @@ pub type BlobId = [u8; ID_BYTE_SIZE]; /// When a new blob is being registered, the following object is sent. #[derive(Encode, Decode, CloneNoBound, PartialEqNoBound, DebugNoBound, EqNoBound)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -63,6 +64,7 @@ pub struct Blob { #[derive(Encode, Decode, scale_info_derive::TypeInfo, DebugNoBound, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) diff --git a/pallets/core/src/modules/did/base/mod.rs b/pallets/core/src/modules/did/base/mod.rs index 8037c396a..8ea9f88c7 100644 --- a/pallets/core/src/modules/did/base/mod.rs +++ b/pallets/core/src/modules/did/base/mod.rs @@ -61,7 +61,7 @@ impl TryFrom for DidMethodKey { } } -/// The type of the Dock DID. +/// The type of the Dock `DID`. #[derive(Encode, Decode, Clone, Debug, PartialEq, Eq, Copy, Ord, PartialOrd, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[derive(scale_info_derive::TypeInfo)] @@ -102,7 +102,7 @@ impl Index for Did { } /// Contains underlying DID describing its storage type. -#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, MaxEncodedLen)] +#[derive(Encode, Decode, DebugNoBound, Clone, PartialEq, Eq, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr( feature = "serde", @@ -118,7 +118,7 @@ pub enum StoredDidDetails { OnChain(StoredOnChainDidDetails), } -impl StoredDidDetails { +impl StoredDidDetails { pub fn is_onchain(&self) -> bool { matches!(self, StoredDidDetails::OnChain(_)) } diff --git a/pallets/core/src/modules/did/base/offchain.rs b/pallets/core/src/modules/did/base/offchain.rs index ff6cbb5e7..f36fc9ac1 100644 --- a/pallets/core/src/modules/did/base/offchain.rs +++ b/pallets/core/src/modules/did/base/offchain.rs @@ -5,7 +5,7 @@ use crate::{common::TypesAndLimits, deposit_indexed_event}; /// Off-chain DID has no need of nonce as the signature is made on the whole transaction by /// the caller account and Substrate takes care of replay protection. Thus it stores the data /// about off-chain DID Doc (hash, URI or any other reference) and the account that owns it. -#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, MaxEncodedLen)] +#[derive(Encode, Decode, DebugNoBound, Clone, PartialEq, Eq, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( @@ -20,13 +20,13 @@ pub struct OffChainDidDetails { pub doc_ref: OffChainDidDocRef, } -impl From> for StoredDidDetails { +impl From> for StoredDidDetails { fn from(details: OffChainDidDetails) -> Self { Self::OffChain(details) } } -impl TryFrom> for OffChainDidDetails { +impl TryFrom> for OffChainDidDetails { type Error = Error; fn try_from(details: StoredDidDetails) -> Result { @@ -36,7 +36,7 @@ impl TryFrom> for OffChainDidDetails { } } -impl OffChainDidDetails { +impl OffChainDidDetails { /// Constructs new off-chain DID details using supplied params. pub fn new(account_id: T::AccountId, doc_ref: OffChainDidDocRef) -> Self { Self { @@ -71,7 +71,7 @@ pub enum OffChainDidDocRef { Custom(BoundedBytes), } -impl OffChainDidDocRef { +impl OffChainDidDocRef { pub fn len(&self) -> u32 { match self { OffChainDidDocRef::CID(v) => v.len() as u32, diff --git a/pallets/core/src/modules/did/base/signature.rs b/pallets/core/src/modules/did/base/signature.rs index 63317850b..64261c36f 100644 --- a/pallets/core/src/modules/did/base/signature.rs +++ b/pallets/core/src/modules/did/base/signature.rs @@ -42,6 +42,7 @@ pub trait AuthorizeSigned: Signed { ) -> Result>, Error>; } +/// `DID`'s signature along with the used `DID`s key reference. #[derive(Encode, Decode, Debug, Clone, PartialEq, Eq, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] diff --git a/pallets/core/src/modules/did/details_aggregator.rs b/pallets/core/src/modules/did/details_aggregator.rs index 2d6cb32eb..daac11fbf 100644 --- a/pallets/core/src/modules/did/details_aggregator.rs +++ b/pallets/core/src/modules/did/details_aggregator.rs @@ -6,7 +6,7 @@ use crate::{ }; /// Aggregated details for the given DID. -#[derive(Encode, Decode, Debug, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, DebugNoBound, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( @@ -14,6 +14,7 @@ use crate::{ serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) )] #[derive(scale_info_derive::TypeInfo)] +#[scale_info(skip_type_params(T))] #[scale_info(omit_prefix)] pub struct AggregatedDidDetailsResponse { did: Did, @@ -39,13 +40,14 @@ pub struct DidKeyWithId { } /// `ServiceEndpoint` with its identifier. -#[derive(Encode, Decode, scale_info_derive::TypeInfo, Debug, Clone, PartialEq, Eq)] +#[derive(Encode, Decode, scale_info_derive::TypeInfo, DebugNoBound, Clone, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) )] +#[scale_info(skip_type_params(T))] #[scale_info(omit_prefix)] pub struct ServiceEndpointWithId { id: ServiceEndpointId, diff --git a/pallets/core/src/modules/did/mod.rs b/pallets/core/src/modules/did/mod.rs index bb3ff00f8..9a9471a15 100644 --- a/pallets/core/src/modules/did/mod.rs +++ b/pallets/core/src/modules/did/mod.rs @@ -363,10 +363,14 @@ pub mod pallet { Self::new_did_method_key_(did_key).map_err(Into::into) } - /// Adds `StateChange` to the metadata. + /// Adds `StateChange` and `AggregatedDidDetailsResponse` to the metadata. #[doc(hidden)] #[pallet::weight(::DbWeight::get().writes(10))] - pub fn noop(_o: OriginFor, _s: common::StateChange<'static, T>) -> DispatchResult { + pub fn noop( + _o: OriginFor, + _s: common::StateChange<'static, T>, + _d: AggregatedDidDetailsResponse, + ) -> DispatchResult { Err(DispatchError::BadOrigin) } } diff --git a/pallets/core/src/modules/did/service_endpoints.rs b/pallets/core/src/modules/did/service_endpoints.rs index 8388c85de..be8160dc4 100644 --- a/pallets/core/src/modules/did/service_endpoints.rs +++ b/pallets/core/src/modules/did/service_endpoints.rs @@ -72,7 +72,7 @@ bitflags::bitflags! { impl_bits_conversion! { ServiceEndpointType from u16 } impl_wrapper_type_info! { ServiceEndpointType(u16) } -impl ServiceEndpoint { +impl ServiceEndpoint { pub fn is_valid(&self) -> bool { !self.types.is_empty() && !self.origins.is_empty() diff --git a/pallets/core/src/modules/master/mod.rs b/pallets/core/src/modules/master/mod.rs index d7a794977..801d264a0 100644 --- a/pallets/core/src/modules/master/mod.rs +++ b/pallets/core/src/modules/master/mod.rs @@ -91,6 +91,7 @@ mod tests; Encode, Decode, CloneNoBound, PartialEqNoBound, EqNoBound, DebugNoBound, MaxEncodedLen, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -117,6 +118,7 @@ impl Default for Membership { Encode, Decode, scale_info_derive::TypeInfo, Clone, PartialEq, Eq, DebugNoBound, Default, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) diff --git a/pallets/core/src/modules/offchain_signatures/actions.rs b/pallets/core/src/modules/offchain_signatures/actions.rs index e8f3b162c..0c8eabb0c 100644 --- a/pallets/core/src/modules/offchain_signatures/actions.rs +++ b/pallets/core/src/modules/offchain_signatures/actions.rs @@ -5,6 +5,7 @@ use super::*; #[derive(Encode, Decode, scale_info_derive::TypeInfo, Clone, PartialEq, Eq, DebugNoBound)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -18,6 +19,7 @@ pub struct AddOffchainSignatureParams { #[derive(Encode, Decode, scale_info_derive::TypeInfo, Clone, PartialEq, Eq, DebugNoBound)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -32,6 +34,7 @@ pub struct AddOffchainSignaturePublicKey { #[derive(Encode, Decode, scale_info_derive::TypeInfo, Clone, PartialEq, Eq, DebugNoBound)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -45,6 +48,7 @@ pub struct RemoveOffchainSignatureParams { #[derive(Encode, Decode, scale_info_derive::TypeInfo, Clone, PartialEq, Eq, DebugNoBound)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) diff --git a/pallets/core/src/modules/offchain_signatures/schemes.rs b/pallets/core/src/modules/offchain_signatures/schemes.rs index b20a7ae52..835ebda05 100644 --- a/pallets/core/src/modules/offchain_signatures/schemes.rs +++ b/pallets/core/src/modules/offchain_signatures/schemes.rs @@ -19,6 +19,7 @@ macro_rules! def_signature_scheme_key_and_params { $(#[$key_meta])* #[derive(scale_info_derive::TypeInfo, Encode, Decode, CloneNoBound, PartialEqNoBound, EqNoBound, DebugNoBound, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) @@ -116,6 +117,7 @@ macro_rules! def_signature_scheme_key_and_params { $(#[$params_meta])* #[derive(scale_info_derive::TypeInfo, Encode, Decode, CloneNoBound, PartialEqNoBound, EqNoBound, DebugNoBound, MaxEncodedLen)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] + #[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) diff --git a/pallets/core/src/util/with_nonce.rs b/pallets/core/src/util/with_nonce.rs index ff0260e40..e6d93948b 100644 --- a/pallets/core/src/util/with_nonce.rs +++ b/pallets/core/src/util/with_nonce.rs @@ -9,6 +9,7 @@ use crate::common::Types; /// Initial nonce will be equal to the current block number provided by the system. #[derive(Encode, Decode, scale_info_derive::TypeInfo, Clone, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound( diff --git a/pallets/token-migration/src/lib.rs b/pallets/token-migration/src/lib.rs index 7180e3f2f..56fadf7e5 100644 --- a/pallets/token-migration/src/lib.rs +++ b/pallets/token-migration/src/lib.rs @@ -58,6 +58,7 @@ mod tests; DefaultNoBound, )] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] +#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))] #[cfg_attr( feature = "serde", serde(bound(serialize = "T: Sized", deserialize = "T: Sized")) diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 08245b42e..362d03b6e 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -2,7 +2,7 @@ authors = ["Dock.io"] edition = "2021" name = "dock-runtime" -version = "0.24.0" +version = "0.25.0" license = "Apache-2.0" [package.metadata.docs.rs] diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index 422018532..7d07463c2 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -203,7 +203,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("dock-pos-dev-runtime"), impl_name: create_runtime_str!("Dock"), authoring_version: 1, - spec_version: 47, + spec_version: 48, impl_version: 2, transaction_version: 2, apis: RUNTIME_API_VERSIONS, diff --git a/scripts/ansible/aws/ec2-set-volume-size.yml b/scripts/ansible/aws/ec2-set-volume-size.yml index 5d9b930ed..a0588ce96 100644 --- a/scripts/ansible/aws/ec2-set-volume-size.yml +++ b/scripts/ansible/aws/ec2-set-volume-size.yml @@ -3,6 +3,7 @@ gather_facts: False vars: instance_name: "{{ name }} (created by ansible)" + volume_type_default: "{{ volume_type | default('io1') }}" tasks: - name: Get EC2 instance state @@ -23,6 +24,8 @@ instance: "{{ instances['instances'][0].instance_id }}" id: "{{ instances['instances'][0].block_device_mappings[0].ebs.volume_id }}" volume_size: "{{ volume_size }}" + volume_type: "{{ volume_type_default }}" + iops: "{{ iops | default(1300) if volume_type_default is regex('^io*') else omit }}" modify_volume: true - name: Add a host