post_tasks not getting executed

Hi All,

I have the bellow playbook :

site.yml :

.
.
.

  • hosts: web-servers
    user: root
    vars_files:

  • private_vars/secret-vars.yml

  • group_vars/all.yml

  • group_vars/us-east.yml

roles:

  • { role : common , tags: [ ‘common-role’ ] }
  • { role : web, tags: [ ‘web-role’ ] }

post_tasks:
include: roles/common/tasks/clean-files.yml

.
.
.

Unfortunately when I run the palybook the post_tasks action doesn’t get executed. Any help ?

Are you running it with any tags specified perhaps?

If your post tags aren’t tagged, that could be why.