Check uname to decide which inventory to use

This commit is contained in:
Anthony Rose 2022-09-19 11:23:35 +01:00
parent ddb9f465dd
commit a97c00ab2c
2 changed files with 16 additions and 4 deletions

View file

@ -1,3 +1,9 @@
#!/bin/sh #!/bin/sh
. ./roles/home-cli/files/bash_profile . ./roles/home-cli/files/profile
./user-cli.yml -i ./local.ini if [ $(uname -s) = FreeBSD ]
then
INVENTORY=./inventories/local-freebsd.ini
else
INVENTORY=./inventories/local-linux.ini
fi
./user-cli.yml -i $INVENTORY

View file

@ -1,3 +1,9 @@
#!/bin/sh #!/bin/sh
. ./roles/home-cli/files/bash_profile . ./roles/home-cli/files/profile
./user-gui.yml -i ./local.ini if [ $(uname -s) = FreeBSD ]
then
INVENTORY=./inventories/local-freebsd.ini
else
INVENTORY=./inventories/local-linux.ini
fi
./user-gui.yml -i $INVENTORY