File tree Expand file tree Collapse file tree 2 files changed +1
-16
lines changed
Expand file tree Collapse file tree 2 files changed +1
-16
lines changed Original file line number Diff line number Diff line change 33
44from __future__ import print_function
55
6- import getpass
7- import io
86import os
97import subprocess
108import sys
5755 os .chdir (IMAGE_PREP_DIR )
5856 ci_lib .run ("ansible-playbook -c local -i localhost, _user_accounts.yml" )
5957
60- # FIXME Don't hardcode https://github.com/mitogen-hq/mitogen/issues/1022
61- # and os.environ['USER'] is not populated on Azure macOS runners.
62- os .chdir (HOSTS_DIR )
63- with io .open ('default.hosts' , 'r+' , encoding = 'utf-8' ) as f :
64- user = getpass .getuser ()
65- content = f .read ()
66- content = content .replace ("{{ lookup('pipe', 'whoami') }}" , user )
67- f .seek (0 )
68- f .write (content )
69- f .truncate ()
70- ci_lib .dump_file ('default.hosts' )
71-
7258 cmd = ';' .join ([
7359 'from __future__ import print_function' ,
7460 'import os, sys' ,
Original file line number Diff line number Diff line change 44# When running the tests outside CI, make a single 'target' host which is the
55# local machine. The ansible_user override is necessary since some tests want a
66# fixed ansible.cfg remote_user setting to test against.
7- # FIXME Hardcoded by replacement in some CI runs https://github.com/mitogen-hq/mitogen/issues/1022
8- # and os.environ['USER'] is not populated on Azure macOS runners.
7+ # os.environ['USER'] is an empty string on GitHub Actions macOS runners.
98target ansible_host =localhost ansible_user =" {{ lookup('pipe', 'whoami') }}"
109
1110[test-targets]
You can’t perform that action at this time.
0 commit comments