rename 'pattern' to 'hosts' in playbook format.
This commit is contained in:
parent
687a315a80
commit
5040c01640
3 changed files with 4 additions and 6 deletions
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- pattern: '*'
|
- hosts: '*'
|
||||||
hosts: '/etc/ansible/hosts'
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: configure template & module variables for future template calls
|
- name: configure template & module variables for future template calls
|
||||||
action: setup http_port=80 max_clients=200
|
action: setup http_port=80 max_clients=200
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
- pattern: '*'
|
- hosts: '*'
|
||||||
hosts: /etc/ansible/hosts
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: config step
|
- name: config step
|
||||||
action: setup a=2 b=3 c=4
|
action: setup a=2 b=3 c=4
|
||||||
|
|
|
@ -241,12 +241,12 @@ class PlayBook(object):
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# get configuration information about the pattern
|
# get configuration information about the pattern
|
||||||
pattern = pg['pattern']
|
pattern = pg['hosts']
|
||||||
tasks = pg['tasks']
|
tasks = pg['tasks']
|
||||||
handlers = pg['handlers']
|
handlers = pg['handlers']
|
||||||
user = pg.get('user', C.DEFAULT_REMOTE_USER)
|
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)
|
self.host_list, groups = ansible.runner.Runner.parse_hosts(host_file)
|
||||||
|
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
|
|
Loading…
Reference in a new issue