Assuming you know ahead of time or have a way of finding out during playbook execution which version is installed I don't see why it wouldn't be possible. You could create a couple of yaml dictionaries for the purpose and iterate over whichever one is appropriate using a when statement.
On Monday, October 24, 2016 at 12:23:24 PM UTC-7, [email protected] wrote: > > Hi, > > I'm deploying an application via Ansible on Ubuntu. The application's > .deb requires several php modules but misses some so in my playbook I have > the following. > > - name: Install php packages > apt: name={{item}} state=installed > with_items: > - php5-gd > - php5-imagick > - php5-pgsql > > Is there a way to do the above without specifying '5' so that apt or > Ansible will automatically select the version of php modules to install > based on the existing php package versions installed? > -- -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2f3f203f-587d-4d76-8810-350b9ea162f0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
