Skip to content
Snippets Groups Projects
  • Yorgos Saslis's avatar
    82eedbd6
    Update ansible inventory file when template changes (#1612) · 82eedbd6
    Yorgos Saslis authored
    This trigger ensures the inventory file is kept up-to-date. Otherwise, if the file exists and you've made changes to your terraform-managed infra without having deleted the file, it would never get updated. 
    
    For example, consider the case where you've destroyed and re-applied the terraform resources, none of the IPs would get updated, so ansible would be trying to connect to the old ones.
    82eedbd6
    History
    Update ansible inventory file when template changes (#1612)
    Yorgos Saslis authored
    This trigger ensures the inventory file is kept up-to-date. Otherwise, if the file exists and you've made changes to your terraform-managed infra without having deleted the file, it would never get updated. 
    
    For example, consider the case where you've destroyed and re-applied the terraform resources, none of the IPs would get updated, so ansible would be trying to connect to the old ones.