mirror of
https://github.com/dawidd6/action-ansible-playbook.git
synced 2025-12-06 21:17:15 -07:00
Add check mode and fixes boolean inputs (#111)
* Add check mode option * Fixes boolean inputs Boolean inputs weren't working properly before. Passing any value would result in `true`, which is unexpected and not according to inputs description. This change retrieves booleans with `getBooleanInput()` and sets a default to `false`. Relevant GitHub discussion and comment: https://github.com/actions/toolkit/issues/361#issuecomment-829507270 * Update action.yml * Update test.yml * Update test.yml --------- Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
This commit is contained in:
committed by
GitHub
parent
245b181622
commit
a4d1256d3c
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@@ -64,7 +64,7 @@ jobs:
|
||||
PermitRootLogin no
|
||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
||||
EOF
|
||||
sudo systemctl restart sshd
|
||||
sudo systemctl restart ssh
|
||||
echo 'SSH_KNOWN_HOSTS<<EOF' >> $GITHUB_ENV
|
||||
echo $(ssh-keyscan localhost) >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
@@ -97,6 +97,13 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: With check mode
|
||||
uses: ./
|
||||
with:
|
||||
playbook: playbook.yml
|
||||
directory: test
|
||||
check_mode: true
|
||||
options: --inventory hosts
|
||||
- name: With custom ansible.cfg
|
||||
uses: ./
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user