Skip to content

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.

#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?

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!

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!

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.

2 participants