Re: [ansible-project] Block & rescue misconception

2019-01-29 Thread Sergio Fernandez
Hi all, For the record, as I think this is not specifically documented in the official documentation: When using block inside a role, the correct syntax is: --- - block: - name: Do stuff [...] tags: - tag - othertag - name: Do more stuff [...] tags: - tag

Re: [ansible-project] Block & rescue misconception

2019-01-29 Thread Sergio Fernandez
HI, Si as far as I understand, and my tests points to int, a block & rescue is needed for every task in a role? Is not applicable to various tasks? Regards. *Sergio Fernández* SysAdmin and DevOps Engineer *exoinvesting.com * Email:

Re: [ansible-project] Block & rescue misconception

2019-01-28 Thread Kai Stian Olstad
On 28.01.2019 17:52, sergio.fernan...@exoinvesting.com wrote: instance). But I don't know why the rescue tasks never runs. And the role deploy-api/tasks/main.yml looks like this: --- - block: - name: Create .ssh path for user become: yes file: path: "{{ deploy_path }}/.ssh"

[ansible-project] Block & rescue misconception

2019-01-28 Thread sergio . fernandez
Hi all, I'm using Ansible 2.5.11, using the EC2 dynamic inventory script. I'm trying to do some tasks over an instance with a role using block and rescue, so if one of the tasks fails, the rescue task runs (removing the instance). But I don't know why the rescue tasks never runs. I'm running