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