| 1 |
--- |
| 2 |
- hosts: localhost |
| 3 |
collections: |
| 4 |
- theforeman.foreman |
| 5 |
gather_facts: false |
| 6 |
vars_files: |
| 7 |
- vars/server.yml |
| 8 |
tasks: |
| 9 |
- include_tasks: tasks/location.yml |
| 10 |
vars: |
| 11 |
location_name: "Test Location" |
| 12 |
location_state: "present" |
| 13 |
- include_tasks: tasks/organization.yml |
| 14 |
vars: |
| 15 |
organization_name: "Test Organization" |
| 16 |
organization_state: "present" |
| 17 |
|
| 18 |
- hosts: tests |
| 19 |
collections: |
| 20 |
- theforeman.foreman |
| 21 |
gather_facts: false |
| 22 |
vars_files: |
| 23 |
- vars/server.yml |
| 24 |
tasks: |
| 25 |
- name: create http_proxy |
| 26 |
include_tasks: tasks/http_proxy.yml |
| 27 |
vars: |
| 28 |
http_proxy_state: "present" |
| 29 |
http_proxy_name: "example.org Proxy" |
| 30 |
http_proxy_url: "http://example.org:3128" |
| 31 |
expected_change: true |
| 32 |
- name: create http_proxy again, no change |
| 33 |
include_tasks: tasks/http_proxy.yml |
| 34 |
vars: |
| 35 |
http_proxy_state: "present" |
| 36 |
http_proxy_name: "example.org Proxy" |
| 37 |
http_proxy_url: "http://example.org:3128" |
| 38 |
expected_change: false |
| 39 |
- name: delete http_proxy |
| 40 |
include_tasks: tasks/http_proxy.yml |
| 41 |
vars: |
| 42 |
http_proxy_state: "absent" |
| 43 |
http_proxy_name: "example.org Proxy" |
| 44 |
expected_change: true |
| 45 |
- name: delete http_proxy again, no change |
| 46 |
include_tasks: tasks/http_proxy.yml |
| 47 |
vars: |
| 48 |
http_proxy_state: "absent" |
| 49 |
http_proxy_name: "example.org Proxy" |
| 50 |
expected_change: false |
| 51 |
|
| 52 |
- name: create http_proxy with user/pass |
| 53 |
include_tasks: tasks/http_proxy.yml |
| 54 |
vars: |
| 55 |
http_proxy_state: "present" |
| 56 |
http_proxy_name: "example.org Proxy" |
| 57 |
http_proxy_url: "http://example.org:3128" |
| 58 |
http_proxy_username: "proxyuser" |
| 59 |
http_proxy_password: "proxypass" |
| 60 |
expected_change: true |
| 61 |
- name: create http_proxy with user again, no change |
| 62 |
include_tasks: tasks/http_proxy.yml |
| 63 |
vars: |
| 64 |
http_proxy_state: "present" |
| 65 |
http_proxy_name: "example.org Proxy" |
| 66 |
http_proxy_url: "http://example.org:3128" |
| 67 |
http_proxy_username: "proxyuser" |
| 68 |
|
| 69 |
expected_change: false |
| 70 |
- name: update http_proxy with org/loc |
| 71 |
include_tasks: tasks/http_proxy.yml |
| 72 |
vars: |
| 73 |
http_proxy_state: "present" |
| 74 |
http_proxy_name: "example.org Proxy" |
| 75 |
http_proxy_organizations: |
| 76 |
- "Test Organization" |
| 77 |
http_proxy_locations: |
| 78 |
- "Test Location" |
| 79 |
expected_change: true |
| 80 |
- name: update http_proxy with org/loc, no change |
| 81 |
include_tasks: tasks/http_proxy.yml |
| 82 |
vars: |
| 83 |
http_proxy_state: "present" |
| 84 |
http_proxy_name: "example.org Proxy" |
| 85 |
http_proxy_organizations: |
| 86 |
- "Test Organization" |
| 87 |
http_proxy_locations: |
| 88 |
- "Test Location" |
| 89 |
expected_change: false |
| 90 |
- name: delete http_proxy |
| 91 |
include_tasks: tasks/http_proxy.yml |
| 92 |
vars: |
| 93 |
http_proxy_state: "absent" |
| 94 |
http_proxy_name: "example.org Proxy" |
| 95 |
expected_change: true |
| 96 |
- name: delete http_proxy again, no change |
| 97 |
include_tasks: tasks/http_proxy.yml |
| 98 |
vars: |
| 99 |
http_proxy_state: "absent" |
| 100 |
http_proxy_name: "example.org Proxy" |
| 101 |
expected_change: false |
| 102 |
|
| 103 |
- hosts: localhost |
| 104 |
collections: |
| 105 |
- theforeman.foreman |
| 106 |
gather_facts: false |
| 107 |
vars_files: |
| 108 |
- vars/server.yml |
| 109 |
tasks: |
| 110 |
- include_tasks: tasks/location.yml |
| 111 |
vars: |
| 112 |
location_name: "Test Location" |
| 113 |
location_state: "absent" |
| 114 |
- include_tasks: tasks/organization.yml |
| 115 |
vars: |
| 116 |
organization_name: "Test Organization" |
| 117 |
organization_state: "absent" |
| 118 |
... |