Easy question of the day: so I have a package I want to build
from source. To do so I need to run config feeding some custom
parameters, which makes me think I cannot then use the make [1]
module. So I thought on using the command [2] module instead.

I guess I could do something like

- name: build thing
  command:
    cmd: ./configure --with_that-lib=/path/to/the/lib && make
    args:
      chdir: dev/thing
      creates: dev/thing/thing.o
    register: thing

Now, I have been reading [3] and [4] which suggest breaking into
separate tasks (which I can see the wisdom because it scales up) using
creates from the command [2] module. How would that work? I mean, I
expect if I have a command: doing the configuring and another doing
the making, if one dies, the entire playbook will come to a halt,
which is something I want. But what value is the creates adding here?
Only thing I can think of, which is why I use it, is to ensure a
successful step is not rerun.

Am I overthinking this (hence why I said this is probably the easiest
question of the day)?

[1] https://docs.ansible.com/ansible/latest/modules/make_module.html
[2] https://docs.ansible.com/ansible/latest/modules/command_module.html
[3] https://gist.github.com/jgornick/9962043
[4] 
https://github.com/geerlingguy/ansible-role-git/blob/master/tasks/install-from-source.yml

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAHEKYV58SpimPBZ5fv6524zXoYscfCEru9n7f9pNJxuP%3D3YUbg%40mail.gmail.com.

Reply via email to