Skip to content

Commit

Permalink
Merge pull request #1183 from moreati/issue1182
Browse files Browse the repository at this point in the history
CI: Fix incorrect u=r,g=r,o=rw file permissions on mitogen__has_sudo_pubkey.key
  • Loading branch information
moreati authored Nov 5, 2024
2 parents a35b208 + 43cc937 commit 5895cca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .ci/ansible_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def pause_if_interactive():

with ci_lib.Fold('job_setup'):
os.chdir(TESTS_DIR)
os.chmod('../data/docker/mitogen__has_sudo_pubkey.key', int('0600', 7))
os.chmod('../data/docker/mitogen__has_sudo_pubkey.key', int('0600', 8))

ci_lib.run("mkdir %s", HOSTS_DIR)
for path in glob.glob(TESTS_DIR + '/hosts/*'):
Expand Down
2 changes: 2 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ To avail of fixes in an unreleased version, please download a ZIP file
In progress (unreleased)
------------------------

* :gh:issue:`1182` CI: Fix incorrect world readable/writable file permissions
on SSH key ``mitogen__has_sudo_pubkey.key`` during Ansible tests.


v0.3.16 (2024-11-05)
Expand Down
7 changes: 2 additions & 5 deletions tests/ansible/integration/ssh/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
-o "ControlPath /tmp/mitogen-ansible-test-{{18446744073709551615|random}}"
tasks:
- name: setup ansible_ssh_private_key_file
shell: chmod 0600 ../data/docker/mitogen__has_sudo_pubkey.key
args:
chdir: ../..

- name: ansible_user, ansible_ssh_private_key_file
shell: >
ANSIBLE_ANY_ERRORS_FATAL=false
Expand All @@ -34,6 +29,7 @@
args:
chdir: ../..
register: out
changed_when: false

- name: ansible_user, wrong ansible_ssh_private_key_file
shell: >
Expand All @@ -52,6 +48,7 @@
args:
chdir: ../..
register: out
changed_when: false
ignore_errors: true

- assert:
Expand Down

0 comments on commit 5895cca

Please sign in to comment.