]> gitweb.hamatoma.de Git - ansknife.git/commitdiff
V0.1.6 CreateSysInfo, needed.tgz
authorHamatoma <author@hamatoma.de>
Wed, 3 Sep 2025 12:32:33 +0000 (14:32 +0200)
committerHamatoma <author@hamatoma.de>
Wed, 3 Sep 2025 12:32:33 +0000 (14:32 +0200)
- CreateSysInfo: Network and Hw added
- needed.tgz+extended.tgz: better choice, documented

CHANGELOG.md
README.md
playbooks.templates/i_10_basic.yaml
playbooks/create_project.yaml
resources/extended.tgz [new file with mode: 0644]
resources/needed.tgz
resources/rsh.tgz [deleted file]
templates.fix/scripts/CreateSysInfo
templates.vars/packages.yaml

index 7ab4c0b3c7021c3cda883c5a2f478fe5d2ec8450..cc234d95f2ef886422358b8928de4fd5d1a5b354 100644 (file)
@@ -1,3 +1,8 @@
+# V0.1.6 CreateSysInfo, needed.tgz 
+
+- CreateSysInfo: Network and Hw added
+- needed.tgz+extended.tgz: better choice, documented
+
 # V0.1.5 Docu mysql
 
 - 71_mysql.md: setting of a password for root
index 6f7b7e56f1e027abbb30c33eac1d78f5671296da..56da14d727b22de08e4fca76aec0becc0d25db8a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -21,10 +21,10 @@ The server name may be "colibri", we take the name also for the new project.
 - start a playbook to create the project colibri: /home/workspace/ansible/colibri will be created
 ```
 BASE=/home/workspace/ansible
-GIT_REP=ssh://myserver.com/git/repo
+GIT_REPO=https://codeberg.org/Hamatoma/ansknife.git
 PROJ=colibri
 cd $BASE
-git clone $GIT_REP/ansknife.git
+git clone $GIT_REPO
 cd ansknife
 ansible-playbook playbook/create_project -e project=$PROJ
 cd ../$PROJ
index c7ef6d9746470a7a6beb79a1f57517a9dbc71ea2..e2e46906eddf618afc1d51900ce1d051c71a7a81 100644 (file)
@@ -4,41 +4,53 @@
   vars:
     hostname: "{{ inventory_hostname | regex_search('[0-9a-zA-Z_]+')}}"
   tasks:
-    - name: Prepare /media/trg directory
-      ansible.builtin.file: path=/media/trg state=directory
-    - name: Prepare /media/tmp directory
-      ansible.builtin.file: path=/media/trg state=directory
-    - name: Prepare /media/fs.cave directory
-      ansible.builtin.file: path=/media/fs.cave state=directory
-    - name: Prepare /media/fs.sys directory
-      ansible.builtin.file: path=/media/fs.sys state=directory
-    - name: Prepare /usr/local/bin directory
-      ansible.builtin.file: path=/usr/local/bin state=directory
-    - name: Prepare /usr/local/bin/local directory
-      ansible.builtin.file: path=/usr/local/bin/local state=directory
-    - name: Prepare /usr/share/pyrshell directory
-      ansible.builtin.file: path=/usr/share/pyrshell state=directory
+    - name: Prepare usable directories
+      ansible.builtin.file:
+        path: "{{ item }}"
+        state: directory
+        mode: "777"
+      with_items:
+        - /media/src
+        - /media/trg
+        - /media/tmp
+        - /media/fs.cave
+        - /media/fs.sys
+        - /usr/local/bin
+        - /usr/local/bin/local
+
     - name: Symbolic link to local directory
-      ansible.builtin.file: src=/usr/local/bin/local dest=/usr/local/bin/{{hostname}} state=link
+      ansible.builtin.file:
+        src: /usr/local/bin/local
+        dest: "/usr/local/bin/{{ hostname }}"
+        state: link
+
     - name: Unpack a tar into /usr/local/bin/local
-      ansible.builtin.unarchive: src=../resources/needed.tgz dest=/usr/local/bin
+      ansible.builtin.unarchive:
+        src: "../resources/needed.tgz"
+        dest: /usr/local/bin
+
     - name: Symbolic link to /p
-      ansible.builtin.file: src=/usr/local/bin/std.profile dest=/p state=link
-    - name: Unpack a tar into /usr/share/pyrshell
-      ansible.builtin.unarchive: src=../resources/rsh.tgz dest=/usr/share/pyrshell
+      ansible.builtin.file:
+        src: /usr/local/bin/std.profile
+        dest: /p
+        state: link
+
     - name: Create configuration directory
-      ansible.builtin.file: path=/etc/config state=directory mode=0700
+      ansible.builtin.file:
+        path: /etc/config
+        state: directory
+        mode: "700"
+
     - name: Create webapp.d
-      ansible.builtin.file: path=/etc/config/webapps.d state=directory mode=0700
-    - name: Create directories in /media
-      ansible.builtin.file: path=/media/{{ item }} state=directory mode=0700
-      with_items: [src, tmp, trg]
-    - name: install standard packages
+      ansible.builtin.file:
+        path: /etc/config/webapps.d
+        state: directory
+        mode: "700"
+
+    - name: Install standard packages
       ansible.builtin.apt:
         name: "{{ item }}"
         state: present
         update_cache: true
         cache_valid_time: 3600
       with_items: [htop, rsync, sudo, curl, iotop, jnettop, ssl-cert, ca-certificates, zram-tools, nfs-kernel-server, tmux]
-
-        
\ No newline at end of file
index 60e29a7ea308d0baf6b77d1c313b28709fe3782d..6b22f745c75ad212fb6ea5c1cea6da9d6bc335ab 100644 (file)
@@ -30,7 +30,7 @@
         dest: "{{ base_ansible }}/{{ project }}/resources/{{ item }}"
         force: yes
         state: link
-      with_items: [needed.tgz, rsh.tgz]
+      with_items: [needed.tgz]
     - name: build link to the templates.fix directory
       ansible.builtin.file:
         src: "../ansknife/templates.fix"
diff --git a/resources/extended.tgz b/resources/extended.tgz
new file mode 100644 (file)
index 0000000..ecfc829
Binary files /dev/null and b/resources/extended.tgz differ
index a38998685832bfbd6dd6d1f84287187e4aca9226..5644c92b1fff26d03325a4f2151c0cca5c30009d 100644 (file)
Binary files a/resources/needed.tgz and b/resources/needed.tgz differ
diff --git a/resources/rsh.tgz b/resources/rsh.tgz
deleted file mode 100644 (file)
index 3ff6405..0000000
Binary files a/resources/rsh.tgz and /dev/null differ
index 1d614ff08794312d24b27b640e6bd72566138f45..5ba5df98a475ea2c3b63e3793f67128532a1c21e 100644 (file)
@@ -90,6 +90,13 @@ function Zfs(){
     zfs list -t snapshot >>$fn
   fi
 }
+function Hw(){
+  lshw | gzip > $DIR_INFO/lshw.txt.gz
+  lshw -short | gzip > $DIR_INFO/lshw_short.txt.gz
+}
+function Network(){
+  ip addr >$DIR_INFO/ip_addr.txt
+}
 function DoIt(){
   local debug=
   $debug Packages
@@ -100,6 +107,8 @@ function DoIt(){
   $debug Zfs
   $debug SoftwareRaid
   $debug SmartMonitor
+  $debug Hw
+  $debug Network
 }
 function ShowConfig(){
   echo "= Example of /usr/local/bin/local/CreateSysInfo.conf:"
index ec8f0f2717f64b1db6472a2b108e04e05e065c11..1aae0c7ce21ff1550718b173643d3a3bc1abce92 100644 (file)
@@ -6,3 +6,4 @@ packages_list:
   - unrar-free
   - htop
   - smartmontools
+  - lshw