Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inventory_from_outputs Ansible Role does not permit static values #41

Open
sean-freeman opened this issue Mar 13, 2023 · 1 comment
Open
Labels
needs_research Further research is needed to determine the feasibility and scope of the issue. type/enhancement New feature or request

Comments

@sean-freeman
Copy link

sean-freeman commented Mar 13, 2023

SUMMARY

inventory_from_outputs Ansible Role does not permit static values

The Ansible Role assumes always that Terraform should be aware of the OS Login User and the target Ansible Inventory Group.

In addition, mapping variable "name" is very generic. It would be clearer to prefix every value with host_

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cloud.terraform.inventory_from_outputs

COLLECTION VERSION

1.0.x

CONFIGURATION example
- hosts: localhost
  roles:
    - role: cloud.terraform.inventory_from_outputs
      project_path: "{{ playbook_dir }}/terraform_template"
      mapping_variables:
        host_list: terraform_var_host_list
        name: terraform_var_name
        ip: terraform_var_ip
        user: "root"
        group: "ansible_inv_group1"
ACTUAL RESULTS

Cannot replicate, this bug represents a design decision that should be investigated and alterations accordingly

@sean-freeman sean-freeman changed the title inventory_from_outputs Ansible Role does not permit static values bug: inventory_from_outputs Ansible Role does not permit static values Mar 13, 2023
@sstanovnik
Copy link
Contributor

Thank you for trying this out. Getting feedback from real-world usage is perfect and will guide improvements to this functionality.

For the initial version of the role, we decided on implementing the minimal required parameters for a very simple usecase to work. The assumption is that the terraform file needs changing anyway, and any static variables can just be hardcoded in the .tf file.

We will consider extending the role with support for specifying hardcoded variables, and I also think this is an extremely useful feature. However, perserving compatibility between this role and its counterpart inventory plugin, and to avoid a growing mess of parameters, this is more than a simple fix, so slightly more time for design is necessary.

@sstanovnik sstanovnik changed the title bug: inventory_from_outputs Ansible Role does not permit static values inventory_from_outputs Ansible Role does not permit static values Mar 14, 2023
@sstanovnik sstanovnik added type/enhancement New feature or request needs_research Further research is needed to determine the feasibility and scope of the issue. labels Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_research Further research is needed to determine the feasibility and scope of the issue. type/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants