diff --git a/roles/web_server/molecule/default/prepare.yml b/roles/web_server/molecule/default/prepare.yml index dffe21c6d93ef33aa1ca1236319e311f826b9b26..a4bbf86fa46b522aaa9ee2fb3a26086a1ca49f06 100644 --- a/roles/web_server/molecule/default/prepare.yml +++ b/roles/web_server/molecule/default/prepare.yml @@ -18,7 +18,7 @@ update_cache: true changed_when: false -- hosts: all +- hosts: jessie become: true tasks: @@ -33,15 +33,38 @@ state: present with_dict: 10.31.127.20: "client1" - 10.31.127.30: "parameters-mandatory parameters-mandatory-jessie64" - 10.31.127.31: "parameters-optional parameters-optional-jessie64" + 10.31.127.30: "parameters-mandatory" + 10.31.127.31: "parameters-optional" + + - name: Install curl for testing redirects and webpage content + apt: + name: curl + state: present + +- hosts: stretch + become: true + tasks: + + - name: Set-up the hosts file + lineinfile: + path: /etc/hosts + regexp: "^{{ item.key }}" + line: "{{ item.key }} {{ item.value }}" + owner: root + group: root + mode: 0644 + state: present + with_dict: + 10.31.127.21: "client1" + 10.31.127.32: "parameters-mandatory" + 10.31.127.33: "parameters-optional" - name: Install curl for testing redirects and webpage content apt: name: curl state: present -- hosts: client1 +- hosts: client become: true tasks: