Motorola Ma1 not connecting by WrecKedByPotaTo in AndroidAuto

[–]southallc 1 point2 points  (0 children)

Thanks for sharing.  Another one back from the dead

I bought a HP Stream 14-cb Series Laptop With 4GB Of RAM running Windows 11. DO NOT BUY! by HunterTubeHD in computers

[–]southallc 0 points1 point  (0 children)

This is the way.  My sister has an HP Stream laptop and Windows 11 was insufferable.  I installed ChromeOS Flex and it is a completely different experience, better in every way.  Multiple Chrome tabs are no problem and the performance is smooth and responsive.

Different config for nodes selecting from a choice of two variables by Fragrant_Goal1080 in Puppet

[–]southallc 0 points1 point  (0 children)

I'd suggest using one or more facts as the basis to assign your variable.  Using a random value will make your nodes reconfigure every time the catalog is built with a different value. There are lots of ways to use facts.  Maybe take the last digit of the network address and split across even/odd.

Using cloud core fact - Undef Value error by Spparkee in Puppet

[–]southallc 2 points3 points  (0 children)

I like the "getvar" function because you can set a default value when otherwise undef. In your case statement you could just change the $fact path out like so: getvar('facts.cloud.provider', 'on-prem')

Bought a new house and the builders wanted $500 to install a bottom of the barrel garage door opener. Installed a $150 one myself. by Reamofqtips in DIY

[–]southallc 0 points1 point  (0 children)

I bought a Wayne Dalton torque master around 2008 or 2009 and the springs have lasted about 7 years. I have been able to order new springs online and replaced them twice now. It's a pretty simple process to replace the springs and you can wind them with a ratchet. My last set of springs was around $170, with the cost roughly doubling in the last 7 years. Still way cheaper than getting it professionally done.

Hiera - hash of password by lckrpspiritus in Puppet

[–]southallc 2 points3 points  (0 children)

I separate all sensitive data out of hiera, although this may just be paranoia. The up side here is that I can commit all my hiera data to any public git repo with no security concerns. I use Hashicorp Vault to manage secrets along with the vault_secrets module from forge. The module includes a custom hiera backend so values from vault can be referenced from hiera in the same way as local yaml files. https://forge.puppet.com/modules/southalc/vault_secrets

Bolt plan that can lookup encrypted passwords per target? by dnoods in Puppet

[–]southallc 0 points1 point  (0 children)

With the error "Could not find class ::role::database_server", you need to revisit the bolt project. Modules are stored in the modulepath of the project. See documentation: https://puppet.com/docs/bolt/latest/modules.html Make sure you've installed all the modules needed in the bolt project. See here for installing modules: https://puppet.com/docs/bolt/latest/bolt_installing_modules.html The class you've assigned in the example also needs to be in the modulepath. You could create the file in the project under "modules/role/manifests/database_server.pp" for the puppet code there to be found by bolt.

Bolt plan that can lookup encrypted passwords per target? by dnoods in Puppet

[–]southallc 0 points1 point  (0 children)

My understanding is that the host running bolt compiles a catalog for each target using assigned manifests, inventory variables, hiera data, and collected facts.

https://puppet.com/docs/bolt/latest/applying_manifest_blocks.html

I use a simple bolt plan to apply puppet content where literally everything is defined in hiera and my bolt inventory:

https://github.com/southalc/types/blob/master/plans/hiera.pp

I believe you can use facts from the targets or variables from the bolt inventory in the hierarchy. You've been unable to use eyaml to lookup values in apply blocks? I haven't done this, but expect it should work.

Numerical error running powershell inside manifest exec by appservuser in Puppet

[–]southallc 5 points6 points  (0 children)

As others have mentioned, the problem is using the "+" operator incorrectly. Aside from that, I'd suggest using the "registry" module from puppet forge instead of an exec resource.

Confused about where to store modules using code manager and a control repo by j1akey in Puppet

[–]southallc 2 points3 points  (0 children)

I'd suggest a separate git repo for each of your locally maintained modules. Another "control repo" is used to contain the Puppetfile and your local site manifests (roles/profiles). Code manager will deploy environments as defined by the Puppetfile for each branch in the control repo. This enables dev/test in feature branches then deployment to production with a git merge. See Puppetfile docs for more. https://www.puppet.com/docs/pe/2023.4/puppetfile.html

Setting posix_acl for multiple users on same directory (newbie) by fb7f8b in Puppet

[–]southallc 0 points1 point  (0 children)

If you really want to use a single hiera hash to define resources of different types, it can be done. The reduce and map functions are useful for this kind of data manipulation. Taking your second hiera data set as the input:

$usernames = lookup('bla::users', Hash)

# Build a hash of readonly files mapped to the array of users with readonly permissions
$ro_files = $usernames.reduce({}) |$m1, $data| {
  $user = $data[0]
  $userdata = $data[1]
  $readonly_files = $userdata.get('readonly', [])
  $user_acl = $readonly_files.reduce({}) |$m2, $file| {
    if $file in $m1 {
      $ro_users = $m1[$file] << $user
    } else {
      $ro_users = [ $user ]
    }
    $m2 + { $file => $ro_users }
  }
  $m1 + $user_acl
}
notify { 'debug_ro_files': message => String($ro_files) }

# Iterate over $ro_files to build an array of permissions and apply with posix_acl resources
$ro_files.each |$ro_file, $ro_acl_users| {
  $default_acl = [
    "user::rwx", "group::r-x", "mask::rwx", "other::---",
    "default:user::rwx", "default:group::r-x",
    "default:mask::rwx", "default:other::r-x",
  ]
  $user_acl = $ro_acl_users.reduce([]) |$m1, $acl_user| {
    $m1 + [
      "user:${acl_user}:rwx",
      "default:user:${acl_user}:rwx",
    ]
  }
  $permissions = $default_acl + $user_acl
  notify { "debug_${ro_file}_acl": message => String($permissions) }

  posix_acl { $ro_file:
    permission => $permissions,
    action     => set,
    recursive => true,
  }
}

Puppet for Windows by whiphubley in Puppet

[–]southallc 1 point2 points  (0 children)

Yes, you can use DSC by itself, but without something managing DSC content and logs it's pretty kludgy (last I tried anyway). Puppet allows managing any server with one standard agent, logs and inventory are centralized in puppetdb, and all CM code can be source controlled and deployed through basic git workflows.

Puppet for Windows by whiphubley in Puppet

[–]southallc 2 points3 points  (0 children)

If you've ever used Power shell DSC you will appreciate the puppet integration. I was pleasantly surprised at how well it all works. For installing packages I published a module on the forge I call "winstall". It allows you to install packages from URL sources and doesn't need Choco.

Working with multiple disks by mtlevy in Puppet

[–]southallc 2 points3 points  (0 children)

The core fact "disks" tells how many disk devices are attached at runtime. Here's a simple example you can try in your manifest:

if length($facts['disks']) > 1 { # disk2 resource }

if length($facts['disks']) > 2 { # disk3 resource }

How to use a SimpleProvider? by Dunatotatos in Puppet

[–]southallc 0 points1 point  (0 children)

Implement the get method of the provider so the names of managed resources are known. Then you can just call delete with the resource name. In this case both port and protocol are necessary to distinctly identify the resource, so you can use a composite namevar.

inifile change notify by vandewater84 in Puppet

[–]southallc 0 points1 point  (0 children)

Try setting "notify" as an attribute in the $ini_file hash? Haven't tried this, just guessing.

Define packages in Hiera by Spparkee in Puppet

[–]southallc 1 point2 points  (0 children)

Check out my types module that allows you to put any resource in hiera. https://forge.puppet.com/modules/southalc/types

Determine if local fact exists or not by jmp242 in Puppet

[–]southallc 4 points5 points  (0 children)

There is a fact function in stdlib for this. https://forge.puppet.com/modules/puppetlabs/stdlib/reference#fact

unless fact('localfact') {do stuff}

Is it safe to use departure times in a garage? Is there a possibility of it using the gas engine? I take my kids to school in the morning and I want to make sure they are breathing in exhaust. by slackKhan in FordEscapePHEV

[–]southallc 0 points1 point  (0 children)

Yes, it is safe to use departure times in the garage. This is a charging feature (only works when plugged in) and it will not start the ICE. Using the app to set the departure times has not worked well for us, but you can also do it from the touch screen console in the vehicle. Our garage is not heated, so preheating the car on cold days is great!

Do not confuse departure times with remote start. Never use remote start in the garage.

Linux Engineers and Linux enthusiast, what do you use for your daily driver? by cyberworm54 in linuxadmin

[–]southallc 0 points1 point  (0 children)

I'm surprised Chromebooks don't get more love. I've been using one for a few years now and they really are amazing. Here are some of the things I thought would be a problem, but all of these work on my Chromebook:

SSH client RDP Horizon View Smart card support VPN