I thought this would be super easy but hit a road block (at least in terms 
of an elegance solution - yes I know how to use exec type with sed and grep 
but that feels a bit to much like a workaround)

My requirements is for a file at /etc/cloud/cloud.cfg that looks like this: 

users:
 - default
 - name: ec2-user
   primary-group: users
   groups: users
   lock-passwd: false
   sudo: ['ALL=(ALL) NOPASSWD:ALL']
  
disable_root: 1
ssh_pwauth:   0

to be changed to this (The only change is highlighted below in yellow... 
ssh_pwauthfrom 0 to 1):

users:
 - default
 - name: ec2-user
   primary-group: users
   groups: users
   lock-passwd: false
   sudo: ['ALL=(ALL) NOPASSWD:ALL']
  
disable_root: 1
ssh_pwauth:   1

The file is pre-existing in the AMI and is not created by Puppet. If 
something like this worked, I would be super happy.... but, it doesn't.

  augeas { "enable-ssh-pwauth" :
     changes => ["set /files/etc/ssh/sshd_config/ssh_pwauth 1",]
  } 

I've tried
Augeas 1.0.0 and 1.4.0 on OracleLinux 6.6... Neither seem to work

Is Yaml-like lens in augeas even supported? And, if not, is there any other 
way I can solve this without grep + sed exec type pattern?
Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b6d54be7-a3fe-41cc-95c1-ad9e034f9a04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to