Skip to content

Commit

Permalink
Adds a test user-data file
Browse files Browse the repository at this point in the history
It's contents are somewhat irrelevant, as cloud-init shouldn't pick it (it should not even run).
It's good to be one creating the default user, because if it does
happen, the test easily breaks.
  • Loading branch information
CarlosNihelton committed Dec 16, 2024
1 parent 26a1e53 commit 59ef84b
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#cloud-config
users:
- name: nontestuser
groups: sudo
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
- name: testuser
groups: sudo
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL

write_files:
- path: /etc/wsl.conf
append: true
content: |
[user]
default=testuser

runcmd:
- touch /home/testuser/with_default_user.done

0 comments on commit 59ef84b

Please sign in to comment.