---
- name: Download the app artifact from s3 bucket
aws_s3:
bucket: "my-bucket"
object: "/my-artifact.tar.gz"
mode: get
dest: "my-artifact.tar.gz"
notify:
- Restart App
- name: Unarchive the tar file
unarchive:
src: "my-artifact.tar.gz"
dest: "/app-dir"
- name: Copy the templates to desired locations
template:
src: "my-app.j2"
dest: "/app-dir/my-app.config"
notify:
- Restart App
- meta: flush_handlers
- Some other tasks---
- name: Restart App
systemd:
name: "my-app"
state: restarted[WARNING]: flush_handlers task does not support when conditional
---
- import_tasks: git.yml
when: GIT_ENABLED | default(false)
- import_tasks: -s3.yml
when: not (GIT_ENABLED | default(false))--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/57b12ed9-4a73-42af-8b82-71358f783b82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.