Git Product home page Git Product logo

Comments (4)

Pack3tL0ss avatar Pack3tL0ss commented on August 17, 2024

Sorry for the delay.

An unattended installation is not currently possible. Headless is possible (install without a monitor), but it's currently going to ask you to verify the settings that were pre-staged.

I didn't go down the Ansible path with an unattended install because I would still need to prep the image (burn the image to mico-SD). So I automated that process, allowing the config and a bunch of other stuff (adapter aliases, SSH keys...) to be pre-staged. The pre-staging doesn't eliminate the need for user-interaction, currently, but it drastically reduces it.

Making it completely unattended should be possible, but I have some other higher priority stuff I need to tackle first.

Just thinking through the options though... I see 2 options:

  1. Make option # 3 auto-install on boot without interactive prompt, and without a login session. No need for Ansible, as ConsolePi would just install at first boot (and would reboot itself after completion). We can give the auto-install results on first login (full logs will still be available as well).
  2. Simply support a -silent cmd line argument, on the install script. Which would effectively bypass all prompts, the script will log and exit if it doesn't have what it needs, but as long as it does, it would assume it correct and proceed with the install.

Now that I type this out, I think it would really be both. # 2 ... a -silent option on the installer would be there either way. # 1 just takes the image creator a step further and has it run the script on boot without a user logging in, but I'd need # 2 either way. Granted # 2 would require you still burn the image either via the image_creator script, or other method.

Short of it is this isn't supported currently, but there are very few prompts when installing using the image creator script.

from consolepi.

Pack3tL0ss avatar Pack3tL0ss commented on August 17, 2024

Well some good news, this actually should be fairly straight-forward.

I was in looking at the install scripts working on some other bits, and added a `-siltent' flag. It doesn't do anything yet, just added it as I was working on the args anyway. It should be pretty straight-forward to implement though.

I haven't played with a generic SSH module in Ansible, I'll research when I get the chance, but if you have experience with it... What does it evaluate to determine success (return code?), or maybe it's configurable?

from consolepi.

cadirol avatar cadirol commented on August 17, 2024

Hi
Wow! This sounds great!
I would use this plain ssh module [1] to install ConsolePI
Yes, as far as i used this module, it uses the return code of the remote command.

[1] https://docs.ansible.com/ansible/latest/modules/shell_module.html

from consolepi.

Pack3tL0ss avatar Pack3tL0ss commented on August 17, 2024

Update: ReadMe now updated.

It can be accomplished via cmd_line arguments or by using -C argument to specify the config file to get the arguments from ( see install.conf.example in the installer dir ). See consolepi-upgrade --help to see a full list of arguments.

Min Reqd Args for silent:
consolepi-install -silent --consolepi-pass='c0nS0lePi!' --pi-pass='c0nS0lePi!'
(if not using the image creator you'll need to wget or curl the installer from the repo and run as sudo with the -silent options)

You need to pre-stage the ConsolePi.yaml config To /consolepi-stage... i.e. /home/pi/consolepi-stage/ConsolePi.yaml

A lot of other items will be automatically imported if found in consolepi-stage during the install as well, but ConsolePi.yaml is required.

The consolepi-image-creator script was also overhauled so you can create the image and have the installer auto-start a silent install (it happens on first login, not on first boot). Also if you run the image-creator from a ConsolePi it can mass import a bunch of stuff from that ConsolePi.

Some name changes with the recent updates, wanted to simplify I was using a mix of camel case etc. in some of them.
ConsolePi_stage dir is now consolepi-stage The image creator is consolepi-image-creator.sh and all configuration is done via cmd_line arg or consolepi-image-creator.conf.

A silent install should return 0 if there are no Errors, Warning still result in 0 being returned as the script doesn't stop for a warning, it just shows/logs it. If you get a chance to test with Ansible, please share the playbook, and lmk how it goes.

from consolepi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.