bd1acb74c8
Change: - Mostly increase error coverage for various conditions in play.py - Also fix a string in an error, where get_name() was called before self.name was read in, so get_name() was always ''. Test Plan: - new tests Signed-off-by: Rick Elrod <rick@elrod.me> * Fix regex for py2 and py3 Signed-off-by: Rick Elrod <rick@elrod.me> * py2 hates me Signed-off-by: Rick Elrod <rick@elrod.me>
23 lines
404 B
YAML
23 lines
404 B
YAML
- hosts: localhost
|
|
tasks:
|
|
- command: whoami
|
|
register: whoami
|
|
|
|
- assert:
|
|
that:
|
|
- whoami is successful
|
|
|
|
- set_fact:
|
|
me: "{{ whoami.stdout }}"
|
|
|
|
- hosts: localhost
|
|
user: "{{ me }}"
|
|
tasks:
|
|
- debug:
|
|
msg: worked with user ({{ me }})
|
|
|
|
- hosts: localhost
|
|
remote_user: "{{ me }}"
|
|
tasks:
|
|
- debug:
|
|
msg: worked with remote_user ({{ me }})
|