Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] - Add localhost install support #191

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wsciaroni
Copy link
Contributor

I wanted the ability to install locally onto my existing install of Ubuntu 22.04...

There were/are some bumps in the road still (a few apps still don't install correctly mostly due to the change to 22.04).

As for this PR, I added a new run script and ansible inventory that allow me to install to the local machine. I run sudo ./run_HamPi_playbook_ubuntu_local to execute this locally.

@@ -24,6 +24,8 @@ inventory = hosts
#remote_port = 22
#module_lang = C

is_local_install = False
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wsciaroni Is there any way to parameterize this from a higher level?

@@ -30,7 +30,7 @@
- name: Change hostname to hampc (for current session)
become: yes
command: hostname -b hampc
when: is_pc|bool
when: is_pc|bool and not is_local_install|bool
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, I like this!

@@ -44,7 +44,7 @@
copy:
src: "{{ playbook_dir }}/../files/etc/hostname_hampc"
dest: "/etc/hostname"
when: is_pc|bool
when: is_pc|bool and not is_local_install|bool
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this!

@@ -207,7 +207,7 @@
copy:
src: "{{ playbook_dir }}/../files/etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml"
dest: "/etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml"
when: ansible_distribution == "Ubuntu" and ansible_os_family == "Debian" and (ansible_architecture == "x86_64" or ansible_architecture == "amd64")
when: ansible_distribution == "Ubuntu" and ansible_os_family == "Debian" and (ansible_architecture == "x86_64" or ansible_architecture == "amd64") and not is_local_install|bool
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, since I created the vars "is_pc" and "is_rpi", I haven't simplified the rest of the Ansible playbooks... This is one of literally dozens if not hundreds of examples which could be simplified... Consider this for an optimization down the road...

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#
# Copyright 2020 - 2021, Dave Slotter (W3DJS). All rights reserved.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wsciaroni Please change 2021 to 2022. And you can add your own credits to mine if you'd like for the enhancement.

@@ -0,0 +1,12 @@
#
# Copyright 2020 - 2021, Dave Slotter (W3DJS). All rights reserved.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change 2021 to 2022.

Copy link
Owner

@dslotter dslotter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a few inline comments. Please review.

@wsciaroni
Copy link
Contributor Author

Truly, this isn't ready for reintegration. I think more thorough work needs to be done so that someone can simply run this on a specific machine and end up with essentially the hamPc.

@dslotter
Copy link
Owner

dslotter commented Sep 9, 2022

Truly, this isn't ready for reintegration. I think more thorough work needs to be done so that someone can simply run this on a specific machine and end up with essentially the hamPc.

Well, let's do this... Rather than try to push to master, why don't you push this to a feature branch in HamPi so you can develop it at your own pace without affecting the main branch?

@dslotter dslotter added the enhancement New feature or request label Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants