|
55 | 55 | vars: |
56 | 56 | ansible_become_pass: user1_password |
57 | 57 | when: |
58 | | - # CI containers lack `setfacl` for unpriv -> unpriv |
59 | | - # https://github.com/mitogen-hq/mitogen/issues/1118 |
60 | | - - is_mitogen |
61 | | - or (ansible_facts.distribution in ["MacOSX"] |
62 | | - and ansible_version.full is version("2.11", ">=", strict=True)) |
| 58 | + - | |
| 59 | + # Vanilla Ansible >= 4 (ansible-core >= 2.11) can use `setfacl` for |
| 60 | + # unpriv -> unpriv, but Mitogen test containers lack setfacl |
| 61 | + # https://github.com/mitogen-hq/mitogen/issues/1118 |
| 62 | + ( |
| 63 | + not is_mitogen |
| 64 | + and ansible_facts.distribution in ["MacOSX"] |
| 65 | + and ansible_version.full is version("2.11", ">=", strict=True) |
| 66 | + ) |
| 67 | + # Mitogen + Ansible can do unpriv -> unpriv without temporary files, |
| 68 | + # but Ansible >= 11 (ansible-core >= 2.18) try to use Python 3.13 |
| 69 | + # which triggers https://github.com/python/cpython/issues/115911 |
| 70 | + # on macOS |
| 71 | + or ( |
| 72 | + is_mitogen |
| 73 | + and not ansible_facts.distribution in ["MacOSX"] |
| 74 | + ) |
| 75 | + or ( |
| 76 | + is_mitogen |
| 77 | + and ansible_version.full is version("2.18", "<", strict=True) |
| 78 | + ) |
63 | 79 |
|
64 | 80 | - assert: |
65 | 81 | that: |
66 | 82 | - out.stdout == 'mitogen__user1' |
67 | 83 | fail_msg: | |
68 | 84 | out={{ out }} |
69 | 85 | when: |
70 | | - # CI containers lack `setfacl` for unpriv -> unpriv |
71 | | - # https://github.com/mitogen-hq/mitogen/issues/1118 |
72 | | - - is_mitogen |
73 | | - or (ansible_facts.distribution in ["MacOSX"] |
74 | | - and ansible_version.full is version("2.11", ">=", strict=True)) |
| 86 | + - | |
| 87 | + # Vanilla Ansible >= 4 (ansible-core >= 2.11) can use `setfacl` for |
| 88 | + # unpriv -> unpriv, but Mitogen test containers lack setfacl |
| 89 | + # https://github.com/mitogen-hq/mitogen/issues/1118 |
| 90 | + ( |
| 91 | + not is_mitogen |
| 92 | + and ansible_facts.distribution in ["MacOSX"] |
| 93 | + and ansible_version.full is version("2.11", ">=", strict=True) |
| 94 | + ) |
| 95 | + # Mitogen + Ansible can do unpriv -> unpriv without temporary files, |
| 96 | + # but Ansible >= 11 (ansible-core >= 2.18) try to use Python 3.13 |
| 97 | + # which triggers https://github.com/python/cpython/issues/115911 |
| 98 | + # on macOS |
| 99 | + or ( |
| 100 | + is_mitogen |
| 101 | + and not ansible_facts.distribution in ["MacOSX"] |
| 102 | + ) |
| 103 | + or ( |
| 104 | + is_mitogen |
| 105 | + and ansible_version.full is version("2.18", "<", strict=True) |
| 106 | + ) |
| 107 | +
|
75 | 108 |
|
76 | 109 | - name: Ensure password su without chdir succeeds |
77 | 110 | shell: whoami |
|
81 | 114 | vars: |
82 | 115 | ansible_become_pass: user1_password |
83 | 116 | when: |
84 | | - # CI containers lack `setfacl` for unpriv -> unpriv |
85 | | - # https://github.com/mitogen-hq/mitogen/issues/1118 |
86 | | - - is_mitogen |
87 | | - or (ansible_facts.distribution in ["MacOSX"] |
88 | | - and ansible_version.full is version("2.11", ">=", strict=True)) |
| 117 | + - | |
| 118 | + # Vanilla Ansible >= 4 (ansible-core >= 2.11) can use `setfacl` for |
| 119 | + # unpriv -> unpriv, but Mitogen test containers lack setfacl |
| 120 | + # https://github.com/mitogen-hq/mitogen/issues/1118 |
| 121 | + ( |
| 122 | + not is_mitogen |
| 123 | + and ansible_facts.distribution in ["MacOSX"] |
| 124 | + and ansible_version.full is version("2.11", ">=", strict=True) |
| 125 | + ) |
| 126 | + # Mitogen + Ansible can do unpriv -> unpriv without temporary files, |
| 127 | + # but Ansible >= 11 (ansible-core >= 2.18) try to use Python 3.13 |
| 128 | + # which triggers https://github.com/python/cpython/issues/115911 |
| 129 | + # on macOS |
| 130 | + or ( |
| 131 | + is_mitogen |
| 132 | + and not ansible_facts.distribution in ["MacOSX"] |
| 133 | + ) |
| 134 | + or ( |
| 135 | + is_mitogen |
| 136 | + and ansible_version.full is version("2.18", "<", strict=True) |
| 137 | + ) |
89 | 138 |
|
90 | 139 | - assert: |
91 | 140 | that: |
92 | 141 | - out.stdout == 'mitogen__user1' |
93 | 142 | fail_msg: | |
94 | 143 | out={{ out }} |
95 | 144 | when: |
96 | | - # CI containers lack `setfacl` for unpriv -> unpriv |
97 | | - # https://github.com/mitogen-hq/mitogen/issues/1118 |
98 | | - - is_mitogen |
99 | | - or (ansible_facts.distribution in ["MacOSX"] |
100 | | - and ansible_version.full is version("2.11", ">=", strict=True)) |
| 145 | + - | |
| 146 | + # Vanilla Ansible >= 4 (ansible-core >= 2.11) can use `setfacl` for |
| 147 | + # unpriv -> unpriv, but Mitogen test containers lack setfacl |
| 148 | + # https://github.com/mitogen-hq/mitogen/issues/1118 |
| 149 | + ( |
| 150 | + not is_mitogen |
| 151 | + and ansible_facts.distribution in ["MacOSX"] |
| 152 | + and ansible_version.full is version("2.11", ">=", strict=True) |
| 153 | + ) |
| 154 | + # Mitogen + Ansible can do unpriv -> unpriv without temporary files, |
| 155 | + # but Ansible >= 11 (ansible-core >= 2.18) try to use Python 3.13 |
| 156 | + # which triggers https://github.com/python/cpython/issues/115911 |
| 157 | + # on macOS |
| 158 | + or ( |
| 159 | + is_mitogen |
| 160 | + and not ansible_facts.distribution in ["MacOSX"] |
| 161 | + ) |
| 162 | + or ( |
| 163 | + is_mitogen |
| 164 | + and ansible_version.full is version("2.18", "<", strict=True) |
| 165 | + ) |
101 | 166 |
|
102 | 167 | tags: |
103 | 168 | - su |
|
0 commit comments