From 8c79f21bd72050b4cc2d01fd9fedc07578973c56 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Mon, 9 Jan 2023 12:46:44 +0000 Subject: [PATCH] Update file executable_install-program --- home/dot_local/bin/executable_install-program | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/home/dot_local/bin/executable_install-program b/home/dot_local/bin/executable_install-program index fb0f047e..81da26b4 100644 --- a/home/dot_local/bin/executable_install-program +++ b/home/dot_local/bin/executable_install-program @@ -1144,8 +1144,12 @@ async function installPackageList(packageManager, packages) { unbufferPrefix = 'unbuffer' } const verboseMode = process.env.DEBUG_MODE === 'on' ? 'vv' : '' - await $`ANSIBLE_CONFIG=${process.env.HOME}/.local/share/ansible/ansible.cfg ansible 127.0.0.1 -v${verboseMode} -e '{ ansible_connection: "local", ansible_become_user: "root", ansible_user: "${process.env.USER}", install_homebrew: False }' -m include_role -a name=${pkg}` - log('success', 'Install', `${pkg} successfully installed via ${packageManager}`) + if (osPlatform === 'darwin' || osPlatform === 'linux' || osPlatform === 'windows') { + await $`ANSIBLE_CONFIG=${process.env.HOME}/.local/share/ansible/ansible.cfg ansible 127.0.0.1 -v${verboseMode} -e '{ ansible_connection: "local", ansible_become_user: "root", ansible_user: "${process.env.USER}", ansible_family: "${osPlatform}", install_homebrew: False }' -m include_role -a name=${pkg}` + log('success', 'Install', `${pkg} successfully installed via ${packageManager}`) + } else { + log('warn', 'Ansible', 'Unsupported platform - ' + osPlatform) + } } catch (e) { log('error', 'Install Failure', `There was an error installing ${pkg} with Ansible`) }