Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Lucy Wyman created an issue Puppet Task Runner / BOLT-1109 Create `dynamic` inventory group attribute Issue Type: Task Assignee: Unassigned Created: 2019/02/01 4:03 PM Priority: Normal Reporter: Lucy Wyman This adds new attributes to Bolt::Inventory::Group called dynamic and data_paths, which if specified on a group will load node information from a json file (specifically a terraform state file) when the function inventory_from_json is called in a plan. dynamic is a boolean value which indicates whether the group should generate new inventory when inventory_from_json is called or not. If it is set to true and has nodes defined the node list should be merged with the dynamic inventory. If it is set to false, then no dynamic inventory should be loaded. data_paths is an array of data paths represented as an array of selectors to navigate the JSON data to where we can expect to find hostnames to load as inventory. Questions: Are dynamic, data_paths, and inventory_from_json the write words for what these components are doing? "If it is set to true and has nodes defined the node list should be merged with the dynamic inventory" - this seems doable, but if it's complex I think we can say that any nodes listed will be ignored if dynamic is true. Can we do glob expantion as part of datapaths, so that users don't need to enumerate each specific node? - name: dyn
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Lucy Wyman updated an issue Puppet Task Runner / BOLT-1109 Create `dynamic` inventory group attribute Change By: Lucy Wyman This adds new attributes to {{Bolt::Inventory::Group}} called {{dynamic}} and {{data_paths}}, which if specified on a group will load node information from a json file (specifically a terraform state file) when the function {{inventory_from_json}} is called in a plan.{{dynamic}} is a boolean value which indicates whether the group should generate new inventory when {{inventory_from_json}} is called or not. If it is set to true and has nodes defined the node list should be merged with the dynamic inventory. If it is set to false, then no dynamic inventory should be loaded.{{data_paths}} is an array of data paths represented as an array of selectors to navigate the JSON data to where we can expect to find hostnames to load as inventory.Questions:- Are {{dynamic}}, {{data_paths}}, and {{inventory_from_json}} the write words for what these components are doing?- "If it is set to true and has nodes defined the node list should be merged with the dynamic inventory" - this seems doable, but if it's complex I think we can say that any nodes listed will be ignored if dynamic is true.- Can we do glob expantion as part of datapaths, so that users don't need to enumerate each specific node? Notes:- Define a 'backend', and path to json file- Use this field for the node name, and this field for the IP - multiple data paths- Define the inputs to the backend, the backend returns an array of node objects- This backend now will return node names- Can we be more prescriptive- Grouping targets vs inventory- Have a separate inventory file that configures the backend to lookup a list of nodes- what is the information needed to turn a tfstate into a list of targets- Without having groups in 'outside' inventory, or globs in inventory, not sure how to 'discover' things in terraform- Can get 'groups' from tf, and put those into inventory groups- For this type of resource, here's how to turn that into a node - then a separate bit that is "for all my resources, put these ones into this group"- Could we use terraform outputs? Describe them as tf outputs in bolt or tf and turn that into a list of nodes. {code} - name: dyn dynamic: truedata_paths: - aws name :- 'modules'- 0- 'resources'- 'aws_instance.xenial.*'- 'primary'- 'public_dns'config: transport: ssh{code}
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Lucy Wyman updated an issue Puppet Task Runner / BOLT-1109 Create `dynamic` inventory group attribute Change By: Lucy Wyman This adds new attributes to {{Bolt::Inventory::Group}} called {{dynamic}} and {{data_paths}}, which if specified on a group will load node information from a json file (specifically a terraform state file) when the function {{inventory_from_json}} is called in a plan.{{dynamic}} is a boolean value which indicates whether the group should generate new inventory when {{inventory_from_json}} is called or not. If it is set to true and has nodes defined the node list should be merged with the dynamic inventory. If it is set to false, then no dynamic inventory should be loaded.{{data_paths}} is an array of data paths represented as an array of selectors to navigate the JSON data to where we can expect to find hostnames to load as inventory.Questions:- Are {{dynamic}}, {{data_paths}}, and {{inventory_from_json}} the write words for what these components are doing?- "If it is set to true and has nodes defined the node list should be merged with the dynamic inventory" - this seems doable, but if it's complex I think we can say that any nodes listed will be ignored if dynamic is true.- Can we do glob expantion as part of datapaths, so that users don't need to enumerate each specific node?Notes:- Define a 'backend', and path to json file- Use this field for the node name, and this field for the IP - multiple data paths- Define the inputs to the backend, the backend returns an array of node objects- This backend now will return node names- Can we be more prescriptive- Grouping targets vs inventory- Have a separate inventory file that configures the backend to lookup a list of nodes- what is the information needed to turn a tfstate into a list of targets- Without having groups in 'outside' inventory, or globs in inventory, not sure how to 'discover' things in terraform- Can get 'groups' from tf, and put those into inventory groups- For this type of resource, here's how to turn that into a node - then a separate bit that is "for all my resources, put these ones into this group"- Could we use terraform outputs? Describe them as tf outputs in bolt or tf and turn that into a list of nodes. - Can we turn resources into an array or multiple arrasy of IP and alias (hostname), and can we do that with terrforam output syntax or do we need to do it ourselves? {code} - name: dyn dynamic: truedata_paths: - name:- 'modules'- 0- 'resources'- 'aws_instance.xenial.*'- 'primary'- 'public_dns'config: transport: ssh{code}
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Lucy Wyman updated an issue Puppet Task Runner / BOLT-1109 Create `dynamic` inventory group attribute Change By: Lucy Wyman This adds new attributes to {{Bolt::Inventory::Group}} called {{dynamic}} and {{data_paths}}, which if specified on a group will load node information from a json file (specifically a terraform state file) when the function {{inventory_from_json}} is called in a plan.{{dynamic}} is a boolean value which indicates whether the group should generate new inventory when {{inventory_from_json}} is called or not. If it is set to true and has nodes defined the node list should be merged with the dynamic inventory. If it is set to false, then no dynamic inventory should be loaded.{{data_paths}} is an array of data paths represented as an array of selectors to navigate the JSON data to where we can expect to find hostnames to load as inventory.Questions:- Are {{dynamic}}, {{data_paths}}, and {{inventory_from_json}} the write words for what these components are doing?- "If it is set to true and has nodes defined the node list should be merged with the dynamic inventory" - this seems doable, but if it's complex I think we can say that any nodes listed will be ignored if dynamic is true.- Can we do glob expantion as part of datapaths, so that users don't need to enumerate each specific node?Notes:- Define a 'backend', and path to json file- Use this field for the node name, and this field for the IP - multiple data paths- Define the inputs to the backend, the backend returns an array of node objects- This backend now will return node names- Can we be more prescriptive- Grouping targets vs inventory- Have a separate inventory file that configures the backend to lookup a list of nodes- what is the information needed to turn a tfstate into a list of targets- Without having groups in 'outside' inventory, or globs in inventory, not sure how to 'discover' things in terraform- Can get 'groups' from tf, and put those into inventory groups- For this type of resource, here's how to turn that into a node - then a separate bit that is "for all my resources, put these ones into this group"- Could we use terraform outputs? Describe them as tf outputs in bolt or tf and turn that into a list of nodes.- Can we turn resources into an array or multiple arrasy of IP and alias (hostname), and can we do that with terrforam output syntax or do we need to do it ourselves? - Are outputs calculated at apply, or from the statefile? {code} - name: dyn dynamic: truedata_paths: - name:- 'modules'- 0- 'resources'- 'aws_instance.xenial.*'- 'primary'- 'public_dns'config: transport: ssh{code}
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Lucy Wyman updated an issue Puppet Task Runner / BOLT-1109 Create `dynamic` inventory group attribute Change By: Lucy Wyman This adds new attributes to {{Bolt::Inventory::Group}} called {{dynamic}} and {{data_paths}}, which if specified on a group will load node information from a json file (specifically a terraform state file) when the function {{inventory_from_json}} is called in a plan.{{dynamic}} is a boolean value which indicates whether the group should generate new inventory when {{inventory_from_json}} is called or not. If it is set to true and has nodes defined the node list should be merged with the dynamic inventory. If it is set to false, then no dynamic inventory should be loaded.{{data_paths}} is an array of data paths represented as an array of selectors to navigate the JSON data to where we can expect to find hostnames to load as inventory.Questions:- Are {{dynamic}}, {{data_paths}}, and {{inventory_from_json}} the write words for what these components are doing?- "If it is set to true and has nodes defined the node list should be merged with the dynamic inventory" - this seems doable, but if it's complex I think we can say that any nodes listed will be ignored if dynamic is true.- Can we do glob expantion as part of datapaths, so that users don't need to enumerate each specific node?Notes:- Define a 'backend', and path to json file- Use this field for the node name, and this field for the IP - multiple data paths- Define the inputs to the backend, the backend returns an array of node objects- This backend now will return node names- Can we be more prescriptive- Grouping targets vs inventory- Have a separate inventory file that configures the backend to lookup a list of nodes- what is the information needed to turn a tfstate into a list of targets- Without having groups in 'outside' inventory, or globs in inventory, not sure how to 'discover' things in terraform- Can get 'groups' from tf, and put those into inventory groups- For this type of resource, here's how to turn that into a node - then a separate bit that is "for all my resources, put these ones into this group"- Could we use terraform outputs? Describe them as tf outputs in bolt or tf and turn that into a list of nodes.- Can we turn resources into an array or multiple arrasy of IP and alias (hostname), and can we do that with terrforam output syntax or do we need to do it ourselves?- Are outputs calculated at apply, or from the statefile? Apply {code} - name: dyn dynamic: truedata_paths: - name:- 'modules'- 0- 'resources'- 'aws_instance.xenial.*'- 'primary'- 'public_dns'config: transport: ssh{code}
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Cas Donoghue commented on BOLT-1109 Re: Create `dynamic` inventory group attribute Common point of reference for what tfstate file and outputs look like for a simple project. https://gist.github.com/donoghuc/684bf66daf26d875a20d952a94079c84 Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Lucy Wyman commented on BOLT-1109 Re: Create `dynamic` inventory group attribute Nick Lewis Cas Donoghue I don't expect I'll be able to investigate this befor the end of the day. If one of you has time to prioritize it before I'm back have at! If not I'll pick it up the 20th Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Lucy Wyman commented on BOLT-1109 Re: Create `dynamic` inventory group attribute https://github.com/hashicorp/terraform/issues/8439 According to this, list comprehensions should be available. I haven't been able to get it working yet, but I think outputting a list of hashes [ {ip => ip, hostname => hostname} ] is possible Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Alex Dreyer updated an issue Puppet Task Runner / BOLT-1109 Create `dynamic` inventory group attribute Change By: Alex Dreyer Sprint: Bolt Ready for Grooming Add Comment This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (BOLT-1109) Create `dynamic` inventory group attribute
Title: Message Title Alex Dreyer updated an issue Puppet Task Runner / BOLT-1109 Create `dynamic` inventory group attribute Change By: Alex Dreyer This adds new attributes to {{Bolt::Inventory::Group}} called {{dynamic}} and {{data_paths}}, which if specified on a group will load node information from a json file (specifically a terraform state file) when the function {{inventory_from_json}} is called in a plan.{{dynamic}} is a boolean value which indicates whether the group should generate new inventory when {{inventory_from_json}} is called or not. If it is set to true and has nodes defined the node list should be merged with the dynamic inventory. If it is set to false, then no dynamic inventory should be loaded.{{data_paths}} is an array of data paths represented as an array of selectors to navigate the JSON data to where we can expect to find hostnames to load as inventory.Questions:- Are {{dynamic}}, {{data_paths}}, and {{inventory_from_json}} the write words for what these components are doing?- "If it is set to true and has nodes defined the node list should be merged with the dynamic inventory" - this seems doable, but if it's complex I think we can say that any nodes listed will be ignored if dynamic is true.- Can we do glob expantion as part of datapaths, so that users don't need to enumerate each specific node?Notes:- Define a 'backend', and path to json file- Use this field for the node name, and this field for the IP - multiple data paths- Define the inputs to the backend, the backend returns an array of node objects- This backend now will return node names- Can we be more prescriptive- Grouping targets vs inventory- Have a separate inventory file that configures the backend to lookup a list of nodes- what is the information needed to turn a tfstate into a list of targets- Without having groups in 'outside' inventory, or globs in inventory, not sure how to 'discover' things in terraform- Can get 'groups' from tf, and put those into inventory groups- For this type of resource, here's how to turn that into a node - then a separate bit that is "for all my resources, put these ones into this group"- Could we use terraform outputs? Describe them as tf outputs in bolt or tf and turn that into a list of nodes.- Can we turn resources into an array or multiple arrasy of IP and alias (hostname), and can we do that with terrforam output syntax or do we need to do it ourselves?- Are outputs calculated at apply, or from the statefile? Apply{code} - name: dyn dynamic: truedata_paths: - name:- 'modules'- 0- 'resources'- 'aws_instance.xenial.*'- 'primary'- 'public_dns'config: transport: ssh{code}