check for/install git, fix step numbering
This commit is contained in:
parent
862ab49e7f
commit
6b48d85dc5
17
install.sh
17
install.sh
@ -65,7 +65,18 @@ else
|
||||
echo -e "${GREEN}✓ Ansible already installed${NC}"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}[2/5] Downloading playbook...${NC}"
|
||||
# Check if git is installed
|
||||
if ! command -v git &> /dev/null; then
|
||||
echo -e "${YELLOW}git not found. Installing...${NC}"
|
||||
$SUDO apt-get update -qq
|
||||
$SUDO apt-get install -y git
|
||||
echo -e "${GREEN}✓ git installed${NC}"
|
||||
else
|
||||
echo -e "${GREEN}✓ git already installed${NC}"
|
||||
fi
|
||||
|
||||
|
||||
echo -e "${GREEN}[2/4] Downloading playbook...${NC}"
|
||||
|
||||
# Download the playbook and role files
|
||||
cd "$TEMP_DIR"
|
||||
@ -77,10 +88,10 @@ cd openclaw-ansible
|
||||
|
||||
echo -e "${GREEN}✓ Playbook downloaded${NC}"
|
||||
|
||||
echo -e "${GREEN}[3/5] Installing Ansible collections...${NC}"
|
||||
echo -e "${GREEN}[3/4] Installing Ansible collections...${NC}"
|
||||
ansible-galaxy collection install -r requirements.yml
|
||||
|
||||
echo -e "${GREEN}[4/5] Running Ansible playbook...${NC}"
|
||||
echo -e "${GREEN}[4/4] Running Ansible playbook...${NC}"
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo -e "${YELLOW}You will be prompted for your sudo password.${NC}"
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user