Tag Info

Hot answers tagged

5

You need to change your class to a define, as per the below to make it re-usable for other users: define accounts_global::account () { account { $name: ensure => present, } file { "/home/${name}/.ssh/config" : require => Account[$name], owner => $name, group => $name, mode => '0600', content => ...


4

I do this now to add new nodes to my puppet master. For example, I grab the private IP of the puppet master instance in the UserData section of my new node: "echo ", { "Fn::GetAtt" : [ "MasterOfPuppets", "PrivateIp" ] }, " ", { "Fn::GetAtt" : [ "MasterOfPuppets", "PrivateDnsName" ] } ," puppet >> /etc/hosts\n","\n", See page 119 of ...


4

Perhaps you should do this with a define? class bootstrap { define conf ( $israid= undef ) { $loc = $name file { "$loc": content => template(blah.erb); } } } then call it with include bootstrap bootstrap::conf { "/loc": israid => '-r yes \'; } bootstrap::conf { "/otherloc": israid => '-r no \'; } ...


4

You should use a define or a parametrized class, that way you can get name to what you like (IMHO, should be a define): define filename($template = "mytemplate.erb") { file { $name: content => template($template) } } node 'host' { filename { "/tmp/file1": } filename { "/tmp/file2": } } And correct your template to: Jack John James <% ...


4

Solution: I changed /etc/redhat-release to a vSphere recognized value of "Red Hat Enterprise Linux Server release 7.0 (Maipo)", and I can now deploy a VM from my CentOS7 template with customizations applied just fine. Background: After creating and deploying a new Oracle Linux 7 (OEL7) template using the same method as above for CentOS 7 and having it WORK, ...


3

You can use templates. You can install and configure a machine the way you would like it set up, and then convert it to a template. This keeps the same machine configuration for each machine deployed from this template.


3

You could manually create your basic "template" and clone from it, but you should remember to remove "unique" data. For example: configure the template for DHCP networking, you'll assign static IPs after the cloning configure an hostname like "template01" and remember to change it after cloning delete SSH host key files just before shutting down the ...


3

The "scope" variable refers to the Puppet::Parser::Scope class, which also seems to keep track of the source. You can refer to it with scope.source.name: class classname::foo { notice(inline_template("scope='<%= scope.source.name %>'")) } prints notice: Scope(Class[Classname::Foo]): scope='classname::foo'


3

The easiest way to do this is to look at the scope.tags variable, and check for a member with the name of the class you're interested in. By default, a resource is tagged with it's type (like 'class' or 'type'), as well as the name of the defining resource (like 'sensor', or 'snuffler'). In my quick test I did something like this: class other { file { ...


3

The easiest way is to get a tool like SharePoint Manager. Go into the site you are looking at, and find the WebTemplateId property. You can then match it up to a list of known template types. There is another way to do it, but it is much more manual (and ugly) so I won't outline it here. As far as a page template goes - this only works on pages within a ...


3

puppet can use local information.. If you write a facter script that sets a fact.. you can reference that value from inside puppet. Example $ facter puppetversion 2.6.4 I can use $puppetversion in my template or pp file to get 2.6.4. Writing a facter script is pretty easy and you can use puppet to distribute the facter script to place it in the correct ...


3

On Salaudeen Rajack`s blog www.sharepointdiary.com there is a tutorial with explained 6 ways to determine a SharePoint Site Template. The link can be found here. Cited: Use SharePoint Manager, Navigate through the site, and look for "Web Template". Stsadm: stsadm.exe -o enumallwebs -databasename > Template.txt Now, Open the template.txt file and check for ...


2

To get Name of the existing site template {Name of the Site Template} follow the below steps Save a Site as a Template. Go to Site settings –> sites & workspaces –> create. IE Tools > Developer Tools > Find > Select Element By Click > View > Source > DOM (Element) > Highlight and copy the section test . The one in bold will be your site template name. ...


2

Actually, I figured this out. I had followed up with an answer to this on the AWS Cloudformation forum but I forgot (sorry) that this thread was also active. The issue is that the ELB template example is incomplete - so when I copied it, my example was also incomplete: you need to specify an instance type (t1.micro for example, or m1.large) explicitly, or ...


2

However I cannot see where to specify that my instance requires 64-bit architecture in the template file. Assuming you are addressing the example template downloadable via Create a Load-Balanced Apache Website, the instance type and architecture mappings are wired via these two tables: "Mappings" : { "AWSInstanceType2Arch" : { ...


2

Do you really need to fiddle with prefix? If you need two (or more) apaches with different configurations, you can just point apache to different config files and server roots using command-line options: -d directory : specify an alternate initial ServerRoot -f file : specify an alternate ServerConfigFile


2

Ubuntu uses adduser from Debian, and that program just does a straight up file copy from /etc/skel, so you're out of luck there. However, it does support hook scripts (look in adduser(8) for adduser.local), and you could write a little hook script that did a sed -i over some or all of the files in the newly-created home directory to do your text ...


2

Don't clone. Instead, learn configuration managament and unattended installs. Install your debian systems with pxe and a preseed file for debian-installer. That should set up a base system. Then use puppet or chef to manage all configurations. No need for cloning, and you can manage your servers better.


2

You can convert VMs into a template or clone a VM. If you convert to a template you can not edit or power on the machine, the VM is marked as template and you can only deploy a new machine from the template. Power off your machine, right-click it and select Template > Convert to Template, that's it. You can then right-click the template and Deploy ...


2

In your case you can simple copy already installed web server virtual machine files or create base instalation configure it and then copy to another location. After copy you simple add copied machine to ESXi inventory start make all needed changes (host name ip etc) and that's all. Here is simple tutorial how to clone wm in ESXi ...


1

I've tested on my puppet and the correct syntax that worked was: <% @platforms[@platform]['users_allowed'][@host].each do | pubkey | -%> <%= pubkey %> <% end -%> I hope I helped.


1

Unfortunately, there is no such ability.


1

Your code will be executed in the context of a node, so your Ruby code (Dir.foreach) will need to examine the node's local cache. In my Chef installation, the local cache path is required for my chef-client configuration template, so I have this attribute: node[:chef][:cache_path]. So: ...


1

Variables aren't parsed inside single quotes. Use double quotes when you need to interpolate $variables. http://docs.puppetlabs.com/guides/language_guide.html#variable-interpolation-with-quotes


1

All you should need to do is run sp_dropserver then sp_addserver to change the server name after the template is renamed. The restart the SQL instance. exec sp_dropserver 'OldserverName' go exec sp_addserver 'NewServerName', 'LOCAL' go An easier option would be to install SQL after the fact using a script within sysprep to automatically log into the ...


1

You can open the .dot files by using a zip extraction program such as 7-zip. In there you will find the icon files.


1

I managed to figure it out! Because my company does not use issuance policies, there was nothing for the certificate to resolve to. So, to fix this, I changed the template from using issuance policies to using application policies. To do this, open the properties of the certificate template. Click the "Issuance Requirements" tab. In the "Policy type ...



Only top voted, non community-wiki answers of a minimum length are eligible