-
Notifications
You must be signed in to change notification settings - Fork 59
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
base: master
Are you sure you want to change the base?
[Feature] - Add localhost install support #191
Conversation
@@ -24,6 +24,8 @@ inventory = hosts | |||
#remote_port = 22 | |||
#module_lang = C | |||
|
|||
is_local_install = False |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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? |
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.