Commit Graph

6 Commits (d1de7839d792b1a1378f3e9b95d8ebea48c2a607)

Author SHA1 Message Date
Chris Church d1de7839d7 Renamed on_no_hosts_matched/on_no_hosts_remaining to correct names in noop callback, added methods to callback plugin examples. 13 years ago
Michael DeHaan c8878998d1 update some of many copyright dates but we can just do this when editing each file, not super high priority 13 years ago
Rodney Quillo 395093e0bf Move default arguments to the end of the function call. 13 years ago
Rodney Quillo 7ae100611c Adding default on vars_prompt 13 years ago
Dag Wieers 20c1a67711 Abort a play at the start when no hosts matches, or no hosts are remaining
This change makes a distinction between no_hosts_matched and no_hosts_remaining.

In both cases we do not start facts-gathering, or run any tasks.

In the case that there are no more hosts remaining, we abort running tasks and abort the playbook.

I also cleaned up the leftovers from the previous patchsets, as these are no longer required.

This closes #1187.

Example playbook:

```yaml
---
- hosts: emptygroup
  tasks:
  - action: command date
  - action: command false

- hosts: all
  gather_facts: False
  tasks:
  - action: command ls
  - action: command false
  - action: command true

- hosts: all
  tasks:
  - action: command true
  - action: command false

- hosts: all
  tasks:
  - action: command pwd
```
13 years ago
Michael DeHaan 3de4e45741 Move plugin directories 14 years ago