| 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/operatingsystem.yml |
| 10 | vars: |
| 11 | operatingsystem_name: "TestOS1" |
| 12 | operatingsystem_minor: 0 |
| 13 | operatingsystem_description: "TestOS1" |
| 14 | operatingsystem_state: present |
| 15 | - include_tasks: tasks/operatingsystem.yml |
| 16 | vars: |
| 17 | operatingsystem_name: "TestOS1" |
| 18 | operatingsystem_minor: 1 |
| 19 | operatingsystem_description: "TestOS1 SP1" |
| 20 | operatingsystem_state: present |
| 21 | - include_tasks: tasks/operatingsystem.yml |
| 22 | vars: |
| 23 | operatingsystem_name: "TestOS2" |
| 24 | operatingsystem_state: present |
| 25 | - include_tasks: tasks/architecture.yml |
| 26 | vars: |
| 27 | architecture_state: absent |
| 28 | |
| 29 | - hosts: tests |
| 30 | collections: |
| 31 | - theforeman.foreman |
| 32 | gather_facts: false |
| 33 | vars_files: |
| 34 | - vars/server.yml |
| 35 | tasks: |
| 36 | - include_tasks: tasks/architecture.yml |
| 37 | vars: |
| 38 | operatingsystems: |
| 39 | - "TestOS1" |
| 40 | architecture_state: present |
| 41 | expected_change: true |
| 42 | |
| 43 | - include_tasks: tasks/architecture.yml |
| 44 | vars: |
| 45 | operatingsystems: |
| 46 | - "TestOS1" |
| 47 | architecture_state: present |
| 48 | expected_change: false |
| 49 | |
| 50 | - include_tasks: tasks/architecture.yml |
| 51 | vars: |
| 52 | operatingsystems: |
| 53 | - "TestOS1" |
| 54 | - "TestOS1 SP1" |
| 55 | architecture_state: present |
| 56 | expected_change: true |
| 57 | |
| 58 | - include_tasks: tasks/architecture.yml |
| 59 | vars: |
| 60 | operatingsystems: |
| 61 | - "TestOS1" |
| 62 | architecture_state: present |
| 63 | expected_change: true |
| 64 | |
| 65 | - include_tasks: tasks/architecture.yml |
| 66 | vars: |
| 67 | operatingsystems: |
| 68 | - "TestOS2" |
| 69 | architecture_state: present |
| 70 | expected_change: true |
| 71 | |
| 72 | - include_tasks: tasks/architecture.yml |
| 73 | vars: |
| 74 | operatingsystems: |
| 75 | - "TestOS2" |
| 76 | architecture_state: present |
| 77 | expected_change: false |
| 78 | |
| 79 | - include_tasks: tasks/architecture.yml |
| 80 | vars: |
| 81 | architecture_name: "aarch64" |
| 82 | architecture_state: present |
| 83 | expected_change: true |
| 84 | |
| 85 | - include_tasks: tasks/architecture.yml |
| 86 | vars: |
| 87 | architecture_name: "aarch64" |
| 88 | architecture_updated_name: "aarch64-2" |
| 89 | architecture_state: present |
| 90 | expected_change: true |
| 91 | |
| 92 | - include_tasks: tasks/architecture.yml |
| 93 | vars: |
| 94 | architecture_name: "aarch64-2" |
| 95 | architecture_state: present |
| 96 | expected_change: false |
| 97 | |
| 98 | - include_tasks: tasks/architecture.yml |
| 99 | vars: |
| 100 | architecture_name: "aarch64-2" |
| 101 | architecture_state: absent |
| 102 | expected_change: true |
| 103 | |
| 104 | - include_tasks: tasks/architecture.yml |
| 105 | vars: |
| 106 | architecture_state: absent |
| 107 | expected_change: true |
| 108 | |
| 109 | - include_tasks: tasks/architecture.yml |
| 110 | vars: |
| 111 | architecture_state: absent |
| 112 | expected_change: false |
| 113 | |
| 114 | - hosts: localhost |
| 115 | collections: |
| 116 | - theforeman.foreman |
| 117 | gather_facts: false |
| 118 | vars_files: |
| 119 | - vars/server.yml |
| 120 | tasks: |
| 121 | - include_tasks: tasks/operatingsystem.yml |
| 122 | vars: |
| 123 | operatingsystem_description: "{{ item }}" |
| 124 | operatingsystem_state: absent |
| 125 | loop: |
| 126 | - "TestOS1" |
| 127 | - "TestOS1 SP1" |
| 128 | - include_tasks: tasks/operatingsystem.yml |
| 129 | vars: |
| 130 | operatingsystem_name: "TestOS2" |
| 131 | operatingsystem_state: absent |
| 132 | ... |