| 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/organization.yml |
| 10 | vars: |
| 11 | organization_state: absent |
| 12 | - hosts: tests |
| 13 | collections: |
| 14 | - theforeman.foreman |
| 15 | gather_facts: false |
| 16 | vars_files: |
| 17 | - vars/server.yml |
| 18 | tasks: |
| 19 | - include_tasks: tasks/organization.yml |
| 20 | vars: |
| 21 | organization_state: present |
| 22 | organization_description: test |
| 23 | expected_change: true |
| 24 | expected_diff: true |
| 25 | expected_diff_before: "" |
| 26 | expected_diff_after: "description.*test" |
| 27 | - include_tasks: tasks/organization.yml |
| 28 | vars: |
| 29 | organization_state: present |
| 30 | organization_name: "会社" |
| 31 | organization_description: "アクメ株式会社" |
| 32 | expected_change: true |
| 33 | expected_diff: true |
| 34 | expected_diff_before: "" |
| 35 | expected_diff_after: "name['\": ]*\\\\u4f1a\\\\u793e" |
| 36 | - include_tasks: tasks/organization.yml |
| 37 | vars: |
| 38 | organization_state: present |
| 39 | organization_name: "ÄCMÈ" |
| 40 | organization_description: "Because Ä makes it look more METAL" |
| 41 | expected_change: true |
| 42 | expected_diff: true |
| 43 | expected_diff_before: "" |
| 44 | expected_diff_after: "description['\": ]*Because \\\\u00c4 makes it look more METAL" |
| 45 | - include_tasks: tasks/organization.yml |
| 46 | vars: |
| 47 | organization_state: present |
| 48 | expected_change: true |
| 49 | expected_diff: true |
| 50 | expected_diff_before: "description.*test" |
| 51 | expected_diff_after: "description.*A test organization" |
| 52 | - include_tasks: tasks/organization.yml |
| 53 | vars: |
| 54 | organization_state: present |
| 55 | expected_change: false |
| 56 | - include_tasks: tasks/organization.yml |
| 57 | vars: |
| 58 | organization_state: absent |
| 59 | expected_change: true |
| 60 | - include_tasks: tasks/organization.yml |
| 61 | vars: |
| 62 | organization_name: "会社" |
| 63 | organization_state: absent |
| 64 | expected_change: true |
| 65 | - include_tasks: tasks/organization.yml |
| 66 | vars: |
| 67 | organization_name: "ÄCMÈ" |
| 68 | organization_state: absent |
| 69 | expected_change: true |
| 70 | - include_tasks: tasks/organization.yml |
| 71 | vars: |
| 72 | organization_state: present |
| 73 | expected_change: true |
| 74 | - include_tasks: tasks/organization.yml |
| 75 | vars: |
| 76 | organization_state: present |
| 77 | expected_change: false |
| 78 | - include_tasks: tasks/organization.yml |
| 79 | vars: |
| 80 | organization_parameters: |
| 81 | - name: my_param |
| 82 | value: my value |
| 83 | - name: my_param2 |
| 84 | parameter_type: string |
| 85 | value: my other value |
| 86 | - name: my_param3 |
| 87 | parameter_type: array |
| 88 | value: |
| 89 | - array |
| 90 | - value |
| 91 | organization_state: present |
| 92 | expected_change: true |
| 93 | - include_tasks: tasks/organization.yml |
| 94 | vars: |
| 95 | organization_parameters: |
| 96 | - name: my_param |
| 97 | value: my value |
| 98 | - name: my_param2 |
| 99 | parameter_type: string |
| 100 | value: my other value |
| 101 | - name: my_param3 |
| 102 | parameter_type: array |
| 103 | value: |
| 104 | - array |
| 105 | - value |
| 106 | organization_state: present |
| 107 | expected_change: false |
| 108 | - include_tasks: tasks/organization.yml |
| 109 | vars: |
| 110 | organization_parameters: |
| 111 | - name: my_param |
| 112 | value: my value |
| 113 | organization_state: present |
| 114 | expected_change: true |
| 115 | - include_tasks: tasks/organization.yml |
| 116 | vars: |
| 117 | organization_parameters: |
| 118 | - name: my_param |
| 119 | value: my value |
| 120 | organization_state: present |
| 121 | expected_change: false |
| 122 | - include_tasks: tasks/organization.yml |
| 123 | vars: |
| 124 | organization_parameters: [] |
| 125 | organization_state: present |
| 126 | expected_change: true |
| 127 | - include_tasks: tasks/organization.yml |
| 128 | vars: |
| 129 | organization_state: present |
| 130 | expected_change: false |
| 131 | - include_tasks: tasks/organization.yml |
| 132 | vars: |
| 133 | organization_state: absent |
| 134 | expected_change: true |
| 135 | ... |