Sturbi's Home

  • Gallery
  • Modellflug
  • Datenschutz
  • Impressum

Blog

  • Allgemein (11)
    • Sprüche (6)
  • Computer (25)
    • Linux (16)
      • Nagios (5)
      • Nginx (4)
      • Postfix (3)
      • Subversion (1)
    • VMware (3)
    • Windows (9)
      • Powershell (8)
  • Fotografie (25)
  • Reise (7)
    • Hawaii (4)
    • Irland (1)
Wenn du etwas so machst,
wie du es seit zehn Jahren gemacht hast,
dann sind die Chancen groß,
daß du es falsch machst.

Charles F. Kettering amerikanischer Ingenieur * 29.08.1876, † 25.11.1958

Floppy Image aus Ordner erstellen

7. Januar 2021 by Sturbi Kategorie: Linux

Wie erstelle ich mir ein Floppy Image um Windows Treiber bei der Installation im HPE Ilo zu laden

mkdir /tmp/floppy
cd /tmp/floppy
# 75MB sollten reichen
dd if=/dev/zero of=floppy.img bs=1024 count=76800
# /dev/loop30 sollte nicht in Benutzung sein ...
losetup /dev/loop30 floppy.img
mkfs.exfat /dev/loop30
mount /dev/loop30 /mnt
cp ~/data/* /mnt/
umount /mnt
losetup -d /dev/looop30

 

Gegenlicht

25. Oktober 2020 by Sturbi Kategorie: Fotografie

1_MG_2611
1_MG_2615
1_MG_2620
1_MG_2639
1_MG_2649
1_MG_2658
1_MG_2665
1_MG_2674
1_MG_2691
1_MG_2706
1_MG_2710
1_MG_2752
1_MG_2770

Hawaii 2019 / 2020

8. Februar 2020 by Sturbi Kategorie: Fotografie, Hawaii, Reise

Hawaii-2019-20-1
Hawaii-2019-20-2
Hawaii-2019-20-3
Hawaii-2019-20-4
Hawaii-2019-20-5
Hawaii-2019-20-6
Hawaii-2019-20-7
Hawaii-2019-20-8
Hawaii-2019-20-9
Hawaii-2019-20-10
Hawaii-2019-20-11
Hawaii-2019-20-12
Hawaii-2019-20-13
Hawaii-2019-20-14
Hawaii-2019-20-15
Hawaii-2019-20-16
Hawaii-2019-20-17
Hawaii-2019-20-18
Hawaii-2019-20-19
Hawaii-2019-20-20
Hawaii-2019-20-21
Hawaii-2019-20-22
Hawaii-2019-20-23
Hawaii-2019-20-24
12...18►

Mauna Kea

2. Januar 2020 by Sturbi Kategorie: Fotografie, Hawaii, Reise

Am 28.12.2019 war es soweit. Am letzten Tag auf Big Island war die Strasse offen und das Wetter entsprechend.

Also rauf auf den Berg!

Foreman VMware Cloud-Init

9. Oktober 2019 by Sturbi Kategorie: Linux, VMware

/etc/cloud/cloud.cfg

cloud_init_modules:
 - bootcmd

cloud_config_modules:
 - runcmd

cloud_final_modules:
 - scripts-per-once
 - scripts-per-boot
 - scripts-per-instance
 - scripts-user
 - resolv-conf
 - ca-certs
 - yum-add-repo
 - write-files
 - users-groups
 - package-update-upgrade-install
 - runcmd
 - puppet
 - phone-home

system_info:
  distro: rhel
  paths:
    cloud_dir: /var/lib/cloud
    templates_dir: /etc/cloud/templates
  ssh_svcname: sshd

# vim:syntax=yaml

#cloud-config
hostname: <%= @host.name %>
fqdn: <%= @host %>
manage_etc_hosts: true
users:
  - name: root
    ssh-authorized-keys:
      - ssh-ed25519 AAAA.....Vw4L0 sturbi@sturbi.de
      - ssh-rsa AAAAB3N....ji1pU4v foreman-proxy@foreman.sturbi.de

yum_repos:
    puppet6:
        baseurl: http://yum.puppetlabs.com/puppet/el/7/x86_64/
        enabled: true
        gpgcheck: false
        name: Puppet 6

package_update: true
package_upgrade: true

packages:
    - vim
    - tmux
    - mailx

package_reboot_if_required: true

<% if @host.puppetmaster -%>

packages:
    - puppet-agent

puppet:
    conf_file: '/etc/puppetlabs/puppet/puppet.conf'
    ssl_dir: '/opt/puppetlabs/puppet/ssl/'
    conf:
        agent:
            server: "<%= @host.puppetmaster %>"
            certname: "<%= @host.name %>"
        ca_cert: |
            -------BEGIN CERTIFICATE-------
            MIICIjAN.......ZwjH8CAwEAAQ==
            -------END CERTIFICATE-------

<% end %>

phone_home:
  url: <%= foreman_url('built') %>
  post: []
  tries: 10

# Template for VMWare customization via open-vm-tools
identity:
  LinuxPrep:
    domain: <%= @host.domain %>
    hostName: <%= @host.shortname %>
    hwClockUTC: true
    timeZone: 'Europe/Berlin'

globalIPSettings:
  dnsSuffixList: [<%= @host.domain %>]
  <%- @host.interfaces.each do |interface| -%>
  <%- next unless interface.subnet -%>
  dnsServerList: [<%= interface.subnet.dns_primary %>, <%= interface.subnet.dns_secondary %>]
  <%- end -%>

nicSettingMap:
<%- @host.interfaces.each do |interface| -%>
<%- next unless interface.subnet -%>
  - adapter:
      dnsDomain: <%= interface.domain %>
      dnsServerList: [<%= interface.subnet.dns_primary %>, <%= interface.subnet.dns_secondary %>]
      gateway: [<%= interface.subnet.gateway %>]
      ip: <%= interface.ip %>
      subnetMask: <%= interface.subnet.mask %>
<%- end -%>

puppet facts

6. September 2019 by Sturbi Kategorie: Linux

if Facter.value(:kernel) == 'Linux'
  Facter.add('ansible_python_interpreter') do
    setcode do
      ansible_python_interpreter = Facter::Core::Execution.exec('which python3')
      if ansible_python_interpreter.empty?
        ansible_python_interpreter = Facter::Core::Execution.exec('which python')
      end
      ansible_python_interpreter
    end
  end
end

if Facter.value(:kernel) == 'Linux'Facter.add(:tomcat) do
  confine operatingsystem: ['RedHat CentOS']
  setcode do
    process = Facter::Core::Execution.exec('ps -ef | grep [^]]java | grep catalina')
    tomcatinfo = Array.new({})
    regex = %r{/.*catalina.base\=(.*?) .*/}
    home = process[regex, 1]
    if home
      tomcatinfo.push('tomcat.base' => home)
      info = Facter::Core::Execution.exec(home + '/bin/version.sh')
      info = info.split(%r{/\n/})
      info.each do |x|
        tmp = x.split(%r{/:/})
        if tmp[0] =~ %r{/.*erver.*umber/}
          tomcatinfo.push('tomcat.version' => tmp[1].chomp.strip)
        end
        if tmp[0] =~ %r{/JVM Version/}
          tomcatinfo.push('tomcat.jvm' => tmp[1].chomp.strip)
        end
      end
      tomcatinfo
    end
  end
end

require 'json'
Facter.add(:yum_repos) do
  confine operatingsystem: ['RedHat CentOS']
  setcode do
    repos = Array.new({})

    # list enabled yum repos
    enabled_repos = Facter::Core::Execution.execute("/usr/bin/yum repolist enabled | awk '!/repo id/ && !/repolist/ && !/Load/' | awk '{print $1}'")
    splitstring = enabled_repos.split("\n")
    splitstring.each { |reponame| repos.push(reponame => true) }

    # list disabled yum repos
    enabled_repos = Facter::Core::Execution.execute("/usr/bin/yum repolist disabled | awk '!/repo id/ && !/repolist/ && !/Load/' | awk '{print $1}'")
    splitstring = enabled_repos.split("\n")
    splitstring.each { |reponame| repos.push(reponame => false) }

    repos
  end
end

  • « Vorherige Seite
  • 1
  • 2
  • 3
  • 4
  • …
  • 10
  • Nächste Seite »

© 2022 · Sturbi's Home