diff --git a/examples/playbook.yml b/examples/playbook.yml index f4a05e77787..c097226bc30 100644 --- a/examples/playbook.yml +++ b/examples/playbook.yml @@ -1,6 +1,5 @@ --- -- pattern: '*' - hosts: '/etc/ansible/hosts' +- hosts: '*' tasks: - name: configure template & module variables for future template calls action: setup http_port=80 max_clients=200 diff --git a/examples/playbook2.yml b/examples/playbook2.yml index daf91a028be..342a9e79cad 100644 --- a/examples/playbook2.yml +++ b/examples/playbook2.yml @@ -1,6 +1,5 @@ --- -- pattern: '*' - hosts: /etc/ansible/hosts +- hosts: '*' tasks: - name: config step action: setup a=2 b=3 c=4 diff --git a/lib/ansible/playbook.py b/lib/ansible/playbook.py index 9242bfd2dac..1af59d56ff7 100755 --- a/lib/ansible/playbook.py +++ b/lib/ansible/playbook.py @@ -241,12 +241,12 @@ class PlayBook(object): ''' # get configuration information about the pattern - pattern = pg['pattern'] + pattern = pg['hosts'] tasks = pg['tasks'] handlers = pg['handlers'] user = pg.get('user', C.DEFAULT_REMOTE_USER) - host_file = pg.get('hosts', '/etc/ansible/hosts') + host_file = pg.get('inventory', '/etc/ansible/hosts') self.host_list, groups = ansible.runner.Runner.parse_hosts(host_file) if self.verbose: