Re: [Puppet Users] Puppetforge Selinux Module Not Working

2019-10-07 Thread Becca Robinson
I do not see examples of that use case in the docs.
Please review https://forge.puppet.com/puppetlabs/selinux_core 
<https://forge.puppet.com/puppetlabs/selinux_core> to validate your code 
against examples.

-- 
Becca Robinson


> On Oct 7, 2019, at 6:58 AM, Dan Crisp  wrote:
> 
> Hello all,
> 
> I've download the selinux module from Puppet forge:
> 
>  puppet module list
> /etc/puppetlabs/code/environments/production/modules
> └── fixnetix-base (v0.1.0)
> /etc/puppetlabs/code/modules
> ├── puppetlabs-selinux_core (v1.0.2)
> └── puppetlabs-stdlib (v6.1.0)
> /opt/puppetlabs/puppet/modules (no modules installed)
> 
> 
> # ll /etc/puppetlabs/code/modules
> total 16
> drwxr-xr-x.  4 root root 4096 Oct  3 15:38 ./
> drwxr-xr-x.  4 root root 4096 Oct  4 12:29 ../
> drwxr-xr-x.  6 root root 4096 Aug 14 07:55 selinux/
> drwxr-xr-x. 10 root root 4096 Sep 26 16:17 stdlib/
> 
> I created a manifest like so:
> 
> # cat 
> /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp
> class base::selinux {
> 
> class { selinux:
>   mode => 'permissive',
>   type => 'targeted',
>   }
> 
> }
> 
> 
> Perms etc. all look good:
> 
> # ll /etc/puppetlabs/code/environments/production/modules
> total 16
> drwxr-xr-x.  4 root root 4096 Oct  4 11:48 ./
> drwxr-xr-x.  5 root root 4096 Sep 27 10:40 ../
> drwxr-xr-x. 10 root root 4096 Oct  4 11:48 base/
> 
> 
> # ll 
> /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp
> -rw-r--r--. 1 root root 242 Oct  7 13:47 
> /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp
> 
> However, the agent is failing:
> 
> # puppet agent --no-daemonize --verbose --onetime
> Info: Using configured environment 'production'
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Retrieving locales
> Info: Loading facts
> Error: Could not retrieve catalog from remote server: Error 500 on SERVER: 
> Server Error: Evaluation Error: Error while evaluating a Resource Statement, 
> Could not find declared class selinux (file: 
> /etc/puppetlabs/code/environments/production/modules/base/manifests/selinux.pp,
>  line: 9, column: 5) on node lhcadvdeveye05.com
> Info: Using cached catalog from environment 'production'
> Info: Applying configuration version '1570455621'
> Notice: Applied catalog in 1.22 seconds
> 
> Any help here would be appreciated.
> 
> Thanks,
> Dan.
> 
> 
> 
> -- 
> 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 
> <mailto:puppet-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/cb7dd9d8-d0ac-41ba-bfa8-d3316259bc2d%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/cb7dd9d8-d0ac-41ba-bfa8-d3316259bc2d%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/D6C2FB9F-9EDA-47B5-B269-35CFC5DDFD59%40puppet.com.


Re: [Puppet Users] Puppet : Install a .deb

2019-11-21 Thread Becca Robinson
Take a look at the package resource.
https://puppet.com/docs/puppet/latest/types/package.html 
<https://puppet.com/docs/puppet/latest/types/package.html>
Additionally if the source is not a configured repo, then you may want to use 
the source attribute of the package repo.


-- 
Becca Robinson




> On Nov 20, 2019, at 8:15 PM, Reth Kevin Bagares 
>  wrote:
> 
> How can I install a .deb file in a puppet custom module?
> 
> I want to run this command in a puppet
> 
> ```
> wget https://repo.percona.com/apt/percona-release_0.1-6.$(lsb_release 
> -sc)_all.deb 
> sudo dpkg -i percona-release_0.1-6.$(lsb_release -sc)_all.deb
> sudo apt-get update
> sudo apt-get install percona-xtradb-cluster-full-57
> ```
> and this is my current percona.pp
> 
> ```
> class percona {
> 
> exec{'percona_deb':
>   command => "/usr/bin/wget -q 
> https://repo.percona.com/apt/percona-release_0.1-6.$(lsb_release -sc)_all.deb 
> -O /tmp/percona-re$
>   creates => "/tmp/percona-release_0.1-6.$(lsb_release -sc)_all.deb",
> }
> }
> ```
> 
> running the script in agent `/opt/puppetlabs/bin/puppet agent --test` will 
> download the .deb file
> 
> 
> Disclaimer: This message contains confidential information and is intended 
> only for the individual named. If you are not the named addressee you should 
> not disseminate, distribute or copy this e-mail. Please notify the sender 
> immediately by e-mail if you have received this e-mail by mistake and delete 
> this e-mail from your system. E-mail transmission cannot be guaranteed to be 
> secure or error-free as information could be intercepted, corrupted, lost, 
> destroyed, arrive late or incomplete, or contain viruses. The sender 
> therefore does not accept liability for any errors or omissions in the 
> contents of this message, which arise as a result of e-mail transmission. If 
> verification is required please request a hard-copy version. 
> https://fligno.com <https://fligno.com/>
> 
> -- 
> 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 
> <mailto:puppet-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/bb523251-94cc-4d00-b0e4-d4bf68139bce%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/bb523251-94cc-4d00-b0e4-d4bf68139bce%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/1D764A2C-1F78-4F1B-9DB6-2772FADB6793%40puppet.com.


Re: [Puppet Users] default production environment gets deleted by puppet-code

2019-11-22 Thread Becca Robinson
Hi Claude,

When setting up your control repo, please ensure that you have all of your 
forge modules listed in the Puppetfile.
Code manager will overwrite the contents of your environments directory with 
what is defined in the control repo and Puppetfile.

Here are some helpful links to help you get started setting up code manager on 
PE.

https://puppet.com/docs/pe/2019.2/control_repo.html#how-the-control-repository-works
 
<https://puppet.com/docs/pe/2019.2/control_repo.html#how-the-control-repository-works>
https://puppet.com/docs/pe/2019.2/puppetfile.html#about-puppetfiles 
<https://puppet.com/docs/pe/2019.2/puppetfile.html#about-puppetfiles>
https://puppet.com/docs/pe/2019.2/puppetfile.html#declare-puppet-forge-modules-in-the-puppetfile
 
<https://puppet.com/docs/pe/2019.2/puppetfile.html#declare-puppet-forge-modules-in-the-puppetfile>
https://puppet.com/docs/pe/2019.2/code_mgr_how_it_works.html#how_code_manager_works
 
<https://puppet.com/docs/pe/2019.2/code_mgr_how_it_works.html#how_code_manager_works>
https://puppet.com/docs/pe/2019.2/code_mgr_config.html#configuring_code_manager 
<https://puppet.com/docs/pe/2019.2/code_mgr_config.html#configuring_code_manager>



-- 
Becca Robinson




> On Nov 22, 2019, at 7:08 AM, Claude Bisdorff  wrote:
> 
> Hello,
> I recently started to test puppet enterprise. 
> We did the integration with gitlab to manage code. Deploying code from gitlab 
> works well, but each time I do a "puppet-code deploy -all"or  puppet-code 
> deploy , this deletes the default production environment( 
> "/etc/puppetlabs/code/environments/production" ) on my puppet server, thus 
> also all the modules I have installed from puppet forge. Restarting 
> puppetserver of course recreates it, but all my modules are lost. 
> 
> I don't know if it is related to my config in puppet or if I did some mistake 
> in gitlab, since I played around with the environments. 
> I see an environment master in gitlab and two custom ones I created. The 
> production environment does not appear in gitlab, is this normal? 
> 
> What else could be the reason for this? 
> 
> Kind regards 
> Claude 
> 
> 
> 
> -- 
> 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 
> <mailto:puppet-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/ccf3aa61-73c5-40b6-a64d-f3abc5ffcf60%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/puppet-users/ccf3aa61-73c5-40b6-a64d-f3abc5ffcf60%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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/737B1ED9-9ACC-4683-9B4A-B069DBF805DA%40puppet.com.


Re: [Puppet Users] Hiera Setup Lookup Complaining

2020-02-26 Thread Becca Robinson
Hi Dan,

I see that you have this `puppet lookup match_address --node 
nodename.domain.com.yaml —explain` .

Might want to ditch the .yaml from the node name.

-- 
Becca Robinson
Senior Professional Services Engineer
be...@puppet.com | @_itgrl_
cell: (913) 752-7084
Puppet <https://www.puppet.com/> The shortest path to better software.



> On Feb 24, 2020, at 8:06 AM, Dan Crisp  wrote:
> 
> puppet lookup match_address --node nodename.domain.com.yaml --explain
> 

-- 
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/23594BBE-BA8E-4C45-A087-995551668B02%40puppet.com.


Re: [Puppet Users] Knocking out values

2020-03-07 Thread Becca Robinson
It looks like it’s working as expected.
You did a deep merge, so it is finding all these:

common.yaml
mpm_event
status

host.yaml
headers
include
mpm_prefork
ssl
—mpm_prefork (But this one is excluded to do "knockout_prefix" => "—“,)

-- 
Becca




> On Mar 7, 2020, at 10:53 AM, Helmut Schneider  wrote:
> 
> Hi,
> 
> using Puppet 5.5 and Hiera 3.4.6:
> 
> common.yaml:
> profiles:
>  webserver:
>apache:
>  server:
>modules:
>  enable:
>- mpm_event
>- status
> 
> host.yaml:
> profiles:
>  webserver:
>apache:
>  server:
>modules:
>  enable:
>- headers
>- include
>- mpm_prefork
>- ssl
>- --mpm_event
> 
> config.pp
>  $profiles = lookup({
>"name" => "profiles",
>"merge" => {
>  "strategy" => "deep",
>  "knockout_prefix" => "--",
>},
>"default_value" => [],
>  })
> 
> Notice: {"enable"=>["mpm_event", "status", "headers", "include", 
> "mpm_prefork", "ssl"]}
> Notice: /Stage[main]/My_apache::Config/Notify[apacheCfg/modules]/message: 
> defined 'message' as {
>  'enable' => ['mpm_event', 'status', 'headers', 'include', 'mpm_prefork', 
> 'ssl']
> }
> 
> Why isn't mpm_event being removed?
> 
> Thank you!
> 
> -- 
> 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/r40jif%243uj3%241%40ciao.gmane.io.

-- 
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/400DD1E9-311B-4BC5-A490-0925779E7642%40puppet.com.


Re: [Puppet Users] Knocking out values

2020-03-07 Thread Becca Robinson
I just ran through some testing and try putting single quotes around your 
--mpm_event in Hiera.

host.yaml:
profiles:
 webserver:
   apache:
 server:
   modules:
 enable:
   - headers
   - include
   - mpm_prefork
   - ssl
   - ‘--mpm_event'


puppet lookup --node $(hostname -f) --merge deep --knock-out-prefix '--' 
profiles
---
webserver:
  apache:
server:
  modules:
enable:
- status
- headers
- include
- mpm_prefork
- ssl

-- 
Becca Robinson
Senior Professional Services Engineer
be...@puppet.com | @_itgrl_
cell: (913) 752-7084
Puppet <https://www.puppet.com/> The shortest path to better software.



> On Mar 7, 2020, at 10:53 AM, Helmut Schneider  wrote:
> 
> profiles:
>  webserver:
>apache:
>  server:
>modules:
>  enable:
>- headers
>- include
>- mpm_prefork
>- ssl
>- --mpm_event

-- 
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/9080E237-6541-43F5-80B7-40529973D981%40puppet.com.


Re: [Puppet Users] Knocking out values

2020-03-09 Thread Becca Robinson
What version of Puppet?

-- 
Becca 



> On Mar 8, 2020, at 11:48 AM, Helmut Schneider  wrote:
> 
> Am 07.03.2020 um 19:00 schrieb Becca Robinson:
> 
>> I just ran through some testing and try putting single quotes around your 
>> --mpm_event in Hiera.
>> host.yaml:
>> profiles:
>>  webserver:
>>apache:
>>  server:
>>modules:
>>  enable:
>>- headers
>>- include
>>- mpm_prefork
>>- ssl
>>-‘--mpm_event'
>> puppet lookup --node $(hostname -f) --merge deep --knock-out-prefix '--' 
>> profiles
>> ---
>> webserver:
>>   apache:
>> server:
>>   modules:
>> enable:
>> - status
>> - headers
>> - include
>> - mpm_prefork
>> - ssl
> 
> Single quotes also do not work for me:
> 
>modules:
>  enable:
>- headers
>- include
>- mpm_prefork
>- ssl
>- '--mpm_event'
> 
> helmut@puppet:~$ sudo puppet lookup --node h2786452.stratoserver.net 
> <http://h2786452.stratoserver.net/> --merge deep --knock-out-prefix '--' 
> profiles.webserver.apache.server.modules
> ---
> enable:
> - mpm_event
> - status
> - headers
> - include
> - mpm_prefork
> - ssl
> helmut@puppet:~$
> 
> -- 
> 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 
> <mailto:puppet-users+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/r437ki%247fk%241%40ciao.gmane.io
>  
> <https://groups.google.com/d/msgid/puppet-users/r437ki%247fk%241%40ciao.gmane.io>.

-- 
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/8A0869E0-2424-4D77-8CCF-17AC065D9FAD%40puppet.com.


Re: [Puppet Users] undefined method platform for nil:NilClass since puppetserver upgrade

2020-07-16 Thread Becca Robinson
Hi Andy,

I haven’t seen this before, but I have a thought.
Have you tried removing the new line at the end so the closing of the package 
resource collector isn’t on a new line?

Similar to this?


if("${rhsmtrue}" and $::operatingsystem == 'RedHat'){
  Rhsm_register <| |> 
  -> Yumrepo <| |> 
  -> Package <| provider != ‘rpm' |>
}
else{
 Yumrepo <| |> -> Package <| provider != 'rpm' |>
}

-- 
Becca Robinson




> On Jul 16, 2020, at 2:14 AM, Andy Hall  wrote:
> 
> if("${rhsmtrue}" and $::operatingsystem == 'RedHat'){
>  Rhsm_register <| |> -> Yumrepo <| |> -> Package <| provider != 'rpm'
> |>  <-- THIS IS THE LINE IN QUESTION
> }
> else{
>  Yumrepo <| |> -> Package <| provider != 'rpm' |>
> }

-- 
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/0D2F8D49-E750-42D7-8E8A-F50B7D0260B2%40puppet.com.