Giter Club home page Giter Club logo

Comments (5)

jpmens avatar jpmens commented on June 23, 2024

Handle "restart services" on ubuntu after apt install python3-pip

from quicksetup.

jpmens avatar jpmens commented on June 23, 2024
apt install python3-pip  python3.10-venv

useradd --home-dir /usr/local/owntracks/ansible --create-home --comment Ansible --system ansible

sudo -u ansible python3 -mvenv /usr/local/owntracks/ansible
sudo -u ansible /usr/local/owntracks/ansible/bin/pip install ansible-core

sudo -u ansible /usr/local/owntracks/ansible/bin/ansible-galaxy collection install community.general
sudo -u ansible /usr/local/owntracks/ansible/bin/ansible-galaxy collection install community.crypto

Looks good, but installing c.general collection takes ages on first run. Or does it?

and if I install ansible full?

time sudo -u ansible /usr/local/owntracks/ansible/bin/pip install ansible

real	1m1.490s
user	0m0.006s
sys	0m0.013s

du -sh /usr/local/owntracks/ansible/
626M	/usr/local/owntracks/ansible/

from quicksetup.

jpmens avatar jpmens commented on June 23, 2024
diff --git a/bootstrap.sh b/bootstrap.sh
index 717d4af..fa8893a 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -8,9 +8,10 @@ fi
 if ! which ansible-playbook > /dev/null; then
        echo "Attempting to install ansible for bootstrapping"
        sudo apt update
-       sudo apt -qq install -y ansible
+       sudo NEEDRESTART_MODE=a apt install python3-pip
 fi

+
 # people who know Ansible might be questioning some of the practices
 # here such as why not use ansible.cfg right here, or templates in
 # templates/ directory; the intention is to hide as much of the
@@ -18,4 +19,4 @@ fi

 export ANSIBLE_CONFIG=files/ansible/ansible.cfg

-ansible-playbook owntracks-setup.yml "$@"
+/usr/local/owntracks/ansible/bin/ansible-playbook owntracks-setup.yml "$@"

from quicksetup.

jpmens avatar jpmens commented on June 23, 2024
diff --git a/files/ansible/ansible.cfg b/files/ansible/ansible.cfg
index 01193e9..f5a091a 100644
--- a/files/ansible/ansible.cfg
+++ b/files/ansible/ansible.cfg
@@ -3,3 +3,5 @@ nocows=1
 inventory=inventory.ini
 filter_plugins = filter_plugins/
 jinja2_native = False
+collections_path = /usr/local/owntracks/ansible/.ansible/collections/ansible_collections

from quicksetup.

jpmens avatar jpmens commented on June 23, 2024

Tested on a fresh Debian 12 as well.

from quicksetup.

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.