diff options
author | Matt Clay <matt@mystile.com> | 2019-01-25 19:37:56 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2019-01-25 20:46:53 -0800 |
commit | a8116497ba302de524489ffd47444517b520e9a7 (patch) | |
tree | 3c4d07baddd98426280787f82c1231fefbd8cead /test/integration/targets/sensu_client/tasks/main.yml | |
parent | 73636175da5f44eff2d2ac9623e38ed35d6e6309 (diff) | |
download | ansible-a8116497ba302de524489ffd47444517b520e9a7.tar.gz |
More test fixes for split controller/remote tests.
Diffstat (limited to 'test/integration/targets/sensu_client/tasks/main.yml')
-rw-r--r-- | test/integration/targets/sensu_client/tasks/main.yml | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/test/integration/targets/sensu_client/tasks/main.yml b/test/integration/targets/sensu_client/tasks/main.yml index c15685ad81..387a7c1e22 100644 --- a/test/integration/targets/sensu_client/tasks/main.yml +++ b/test/integration/targets/sensu_client/tasks/main.yml @@ -22,24 +22,23 @@ - default register: client -- name: Retrieve configuration file stat - stat: - path: "{{ client_file }}" - register: client_stat +- name: Retrieve configuration file + slurp: + src: "{{ client_file }}" + register: client_config - name: Assert that client data was set successfully and properly assert: that: - "client is successful" - "client is changed" - - "client_stat.stat.exists == true" - "client['config']['name'] == 'client'" - "'default' in client['config']['subscriptions']" - "client['file'] == client_file" - name: Assert that the client configuration file is actually configured properly vars: - config: "{{ lookup('file', client_file) | from_json }}" + config: "{{ client_config.content | b64decode | from_json }}" assert: that: - "config['client']['keepalives'] == true" @@ -129,10 +128,10 @@ occurrences: "3" register: client_twice -- name: Retrieve configuration file stat - stat: - path: "{{ client_file }}" - register: client_stat +- name: Retrieve configuration file + slurp: + src: "{{ client_file }}" + register: client_config - name: Assert that client data was set successfully and properly assert: @@ -141,7 +140,6 @@ - "client is changed" - "client_twice is successful" - "client_twice is not changed" - - "client_stat.stat.exists == true" - "client['config']['name'] == 'custom'" - "client['config']['address'] == 'host.fqdn'" - "'default' in client['config']['subscriptions']" @@ -155,7 +153,7 @@ - name: Assert that the client configuration file is actually configured properly vars: - config: "{{ lookup('file', client_file) | from_json }}" + config: "{{ client_config.content | b64decode | from_json }}" assert: that: - "config['client']['name'] == 'custom'" |