├── log └── .keep ├── storage └── .keep ├── tmp ├── .keep └── pids │ └── .keep ├── .env ├── lib ├── assets │ └── .keep ├── tasks │ └── .keep └── templates │ └── erb │ └── scaffold │ ├── new.html.erb.tt │ └── edit.html.erb.tt ├── test ├── helpers │ └── .keep ├── mailers │ └── .keep ├── models │ ├── .keep │ ├── group_membership_test.rb │ ├── layer_test.rb │ ├── hiera_data │ │ ├── util_test.rb │ │ ├── git_repo_test.rb │ │ └── layer │ │ │ └── global_test.rb │ ├── user_test.rb │ ├── group_test.rb │ └── saml_test.rb ├── system │ ├── .keep │ ├── access_nodes_keys_test.rb │ └── search_key_test.rb ├── controllers │ ├── .keep │ ├── files_controller_test.rb │ ├── groups_controller_test.rb │ ├── values_controller_test.rb │ ├── lookups_controller_test.rb │ ├── group_memberships_controller_test.rb │ ├── api │ │ └── v1 │ │ │ ├── keys_controller_test.rb │ │ │ ├── nodes_controller_test.rb │ │ │ └── environments_controller_test.rb │ ├── trees_controller_test.rb │ ├── environments_controller_test.rb │ ├── sessions_controller_test.rb │ ├── tree_files_controller_test.rb │ ├── nodes_controller_test.rb │ ├── encrypted_values_controller_test.rb │ └── page_controller_test.rb ├── fixtures │ ├── .keep │ ├── files │ │ ├── .keep │ │ └── puppet │ │ │ ├── environments │ │ │ ├── no_config │ │ │ │ └── .keep │ │ │ ├── development │ │ │ │ ├── data │ │ │ │ │ ├── nodes │ │ │ │ │ │ ├── empty.yaml │ │ │ │ │ │ ├── testhost2.yaml │ │ │ │ │ │ └── testhost.yaml │ │ │ │ │ ├── role │ │ │ │ │ │ └── hdm_test.yaml │ │ │ │ │ └── common.yaml │ │ │ │ ├── environment.conf │ │ │ │ ├── site │ │ │ │ │ └── testmod │ │ │ │ │ │ ├── data │ │ │ │ │ │ └── common.yaml │ │ │ │ │ │ └── hiera.yaml │ │ │ │ └── hiera.yaml │ │ │ ├── globs │ │ │ │ ├── data │ │ │ │ │ ├── common │ │ │ │ │ │ ├── hdm.yaml │ │ │ │ │ │ └── foobar.yaml │ │ │ │ │ ├── nodes │ │ │ │ │ │ ├── testhost2.yaml │ │ │ │ │ │ └── testhost.yaml │ │ │ │ │ └── role │ │ │ │ │ │ └── hdm_test.yaml │ │ │ │ └── hiera.yaml │ │ │ ├── minimal │ │ │ │ └── hiera.yaml │ │ │ ├── no_datadir │ │ │ │ └── hiera.yaml │ │ │ ├── old_unused │ │ │ │ └── hiera.yaml │ │ │ ├── dynamic_datadir │ │ │ │ ├── data1 │ │ │ │ │ └── common.yaml │ │ │ │ ├── data2 │ │ │ │ │ └── common.yaml │ │ │ │ └── hiera.yaml │ │ │ ├── hdm │ │ │ │ ├── hiera.yaml │ │ │ │ ├── modules │ │ │ │ │ └── testmod │ │ │ │ │ │ ├── data │ │ │ │ │ │ └── common.yaml │ │ │ │ │ │ └── hiera.yaml │ │ │ │ └── data │ │ │ │ │ └── common.yaml │ │ │ ├── multiple_hierarchies │ │ │ │ ├── data │ │ │ │ │ ├── zone │ │ │ │ │ │ └── internal.yaml │ │ │ │ │ └── nodes │ │ │ │ │ │ ├── 4msusyei.betadots.training.yaml │ │ │ │ │ │ ├── 60wxmaw5.betadots.training.yaml │ │ │ │ │ │ └── test.host.yaml │ │ │ │ ├── hiera_hdm.yaml │ │ │ │ └── hiera.yaml │ │ │ ├── v3 │ │ │ │ └── hiera.yaml │ │ │ ├── enterprise │ │ │ │ └── hiera.yaml │ │ │ ├── empty_defaults │ │ │ │ └── hiera.yaml │ │ │ ├── lookup_tests │ │ │ │ ├── data │ │ │ │ │ ├── zone │ │ │ │ │ │ └── test_zone.yaml │ │ │ │ │ ├── role │ │ │ │ │ │ └── test_role.yaml │ │ │ │ │ ├── nodes │ │ │ │ │ │ └── lookup.betadots.training.yaml │ │ │ │ │ └── common.yaml │ │ │ │ └── hiera.yaml │ │ │ ├── eyaml │ │ │ │ ├── data │ │ │ │ │ └── nodes │ │ │ │ │ │ ├── test.host.yaml │ │ │ │ │ │ └── 1jyln4zc.betadots.training.yaml │ │ │ │ ├── generate_eyaml_entries.rb │ │ │ │ └── hiera.yaml │ │ │ └── test │ │ │ │ └── hiera.yaml │ │ │ ├── global │ │ │ ├── data │ │ │ │ └── common.yaml │ │ │ └── hiera.yaml │ │ │ ├── nodes │ │ │ ├── 1a9c576a.betadots.training_facts.yaml │ │ │ ├── 1h46n83n.betadots.training_facts.yaml │ │ │ ├── 29hjakkw.betadots.training_facts.yaml │ │ │ ├── 2l8ol0i5.betadots.training_facts.yaml │ │ │ ├── 2r0bw6xn.betadots.training_facts.yaml │ │ │ ├── 2u0d1fei.betadots.training_facts.yaml │ │ │ ├── 535ffe1u.betadots.training_facts.yaml │ │ │ ├── 74h24eg9.betadots.training_facts.yaml │ │ │ ├── 7c6k7ouc.betadots.training_facts.yaml │ │ │ ├── 80fao3k3.betadots.training_facts.yaml │ │ │ ├── 8119nqs7.betadots.training_facts.yaml │ │ │ ├── ajpe03ov.betadots.training_facts.yaml │ │ │ ├── bixzjm53.betadots.training_facts.yaml │ │ │ ├── crffyobe.betadots.training_facts.yaml │ │ │ ├── cwgel3zg.betadots.training_facts.yaml │ │ │ ├── czhn2a3x.betadots.training_facts.yaml │ │ │ ├── dui861cn.betadots.training_facts.yaml │ │ │ ├── ez243lch.betadots.training_facts.yaml │ │ │ ├── f2f7nbka.betadots.training_facts.yaml │ │ │ ├── fqyn3gv9.betadots.training_facts.yaml │ │ │ ├── gkxa25er.betadots.training_facts.yaml │ │ │ ├── h2vjgbw.betadots.training_facts.yaml │ │ │ ├── hol8la5o.betadots.training_facts.yaml │ │ │ ├── k0e042a8.betadots.training_facts.yaml │ │ │ ├── khlktohq.betadots.training_facts.yaml │ │ │ ├── n34tbmpi.betadots.training_facts.yaml │ │ │ ├── ncamizgh.betadots.training_facts.yaml │ │ │ ├── o3tzui7b.betadots.training_facts.yaml │ │ │ ├── p5ufmvb0.betadots.training_facts.yaml │ │ │ ├── pfztw7li.betadots.training_facts.yaml │ │ │ ├── pgysn5ry.betadots.training_facts.yaml │ │ │ ├── q8o2i1tz.betadots.training_facts.yaml │ │ │ ├── rs2bxbd0.betadots.training_facts.yaml │ │ │ ├── siu7z4w7.betadots.training_facts.yaml │ │ │ ├── slwbfc40.betadots.training_facts.yaml │ │ │ ├── szssayw3.betadots.training_facts.yaml │ │ │ ├── t4k08lp.betadots.training_facts.yaml │ │ │ ├── tae1yz1.betadots.training_facts.yaml │ │ │ ├── tbgmw5we.betadots.training_facts.yaml │ │ │ ├── umx7463y.betadots.training_facts.yaml │ │ │ ├── uyiwu2st.betadots.training_facts.yaml │ │ │ ├── vbz66ux7.betadots.training_facts.yaml │ │ │ ├── wbwz457d.betadots.training_facts.yaml │ │ │ ├── won7vzfm.betadots.training_facts.yaml │ │ │ ├── wpo98zhp.betadots.training_facts.yaml │ │ │ ├── x4llfki8.betadots.training_facts.yaml │ │ │ ├── xkpgjql8.betadots.training_facts.yaml │ │ │ ├── ycrxjn7a.betadots.training_facts.yaml │ │ │ ├── yg9kk39i.betadots.training_facts.yaml │ │ │ ├── yjxyvzc1.betadots.training_facts.yaml │ │ │ ├── z36imxyv.betadots.training_facts.yaml │ │ │ ├── z8ybtb4h.betadots.training_facts.yaml │ │ │ ├── ze729k57.betadots.training_facts.yaml │ │ │ ├── 1jyln4zc.betadots.training_facts.yaml │ │ │ ├── 1k4kahf9.betadots.training_facts.yaml │ │ │ ├── 2bvp6vcc.betadots.training_facts.yaml │ │ │ ├── 3p2fr29k.betadots.training_facts.yaml │ │ │ ├── 45kzd3l5.betadots.training_facts.yaml │ │ │ ├── 482krqn7.betadots.training_facts.yaml │ │ │ ├── 56w57wwr.betadots.training_facts.yaml │ │ │ ├── 5f6zzx25.betadots.training_facts.yaml │ │ │ ├── 5lzg8kq4.betadots.training_facts.yaml │ │ │ ├── 5qud69fw.betadots.training_facts.yaml │ │ │ ├── 6iijj7sn.betadots.training_facts.yaml │ │ │ ├── 6mwwmsgg.betadots.training_facts.yaml │ │ │ ├── 6xnchxhs.betadots.training_facts.yaml │ │ │ ├── 7jfq1drl.betadots.training_facts.yaml │ │ │ ├── 7lglxdpg.betadots.training_facts.yaml │ │ │ ├── 7uc8566.betadots.training_facts.yaml │ │ │ ├── 8pripw5v.betadots.training_facts.yaml │ │ │ ├── 90f923dr.betadots.training_facts.yaml │ │ │ ├── 922r0yzv.betadots.training_facts.yaml │ │ │ ├── 98qhkysp.betadots.training_facts.yaml │ │ │ ├── 9n11tuzg.betadots.training_facts.yaml │ │ │ ├── 9t8nhoux.betadots.training_facts.yaml │ │ │ ├── aej86kp6.betadots.training_facts.yaml │ │ │ ├── ahi53aeb.betadots.training_facts.yaml │ │ │ ├── ax8ornqr.betadots.training_facts.yaml │ │ │ ├── b548zrva.betadots.training_facts.yaml │ │ │ ├── b8sp7obs.betadots.training_facts.yaml │ │ │ ├── bvgbu2fl.betadots.training_facts.yaml │ │ │ ├── cgaplboi.betadots.training_facts.yaml │ │ │ ├── d3r3tytg.betadots.training_facts.yaml │ │ │ ├── d4gq3103.betadots.training_facts.yaml │ │ │ ├── d4y2k0qq.betadots.training_facts.yaml │ │ │ ├── d9fpj14l.betadots.training_facts.yaml │ │ │ ├── dhplrtv.betadots.training_facts.yaml │ │ │ ├── dtwhf73e.betadots.training_facts.yaml │ │ │ ├── exs6mbyb.betadots.training_facts.yaml │ │ │ ├── f6obrt1u.betadots.training_facts.yaml │ │ │ ├── fcqtpjn7.betadots.training_facts.yaml │ │ │ ├── fj2yfmw.betadots.training_facts.yaml │ │ │ ├── fpehst39.betadots.training_facts.yaml │ │ │ ├── g227pkf7.betadots.training_facts.yaml │ │ │ ├── g59avopl.betadots.training_facts.yaml │ │ │ ├── g9yi8tjz.betadots.training_facts.yaml │ │ │ ├── glfhgp33.betadots.training_facts.yaml │ │ │ ├── gw1ulcb7.betadots.training_facts.yaml │ │ │ ├── h3l1v58e.betadots.training_facts.yaml │ │ │ ├── h3s4iuga.betadots.training_facts.yaml │ │ │ ├── hnp1da30.betadots.training_facts.yaml │ │ │ ├── jl4rhfpm.betadots.training_facts.yaml │ │ │ ├── m4fnq58u.betadots.training_facts.yaml │ │ │ ├── mrp77rad.betadots.training_facts.yaml │ │ │ ├── ndic5wz7.betadots.training_facts.yaml │ │ │ ├── ns8gwxg3.betadots.training_facts.yaml │ │ │ ├── o2orlwe5.betadots.training_facts.yaml │ │ │ ├── oa2j8g47.betadots.training_facts.yaml │ │ │ ├── otibr6d1.betadots.training_facts.yaml │ │ │ ├── qo10agon.betadots.training_facts.yaml │ │ │ ├── ss4twzpr.betadots.training_facts.yaml │ │ │ ├── sszlxacw.betadots.training_facts.yaml │ │ │ ├── sw15xa6y.betadots.training_facts.yaml │ │ │ ├── szw86yk4.betadots.training_facts.yaml │ │ │ ├── ttns843o.betadots.training_facts.yaml │ │ │ ├── u2s1rcqu.betadots.training_facts.yaml │ │ │ ├── upjxmekx.betadots.training_facts.yaml │ │ │ ├── v4c13rht.betadots.training_facts.yaml │ │ │ ├── vim0dogq.betadots.training_facts.yaml │ │ │ ├── vxkc5b8p.betadots.training_facts.yaml │ │ │ ├── w12bh6f8.betadots.training_facts.yaml │ │ │ ├── wh2fvmnb.betadots.training_facts.yaml │ │ │ ├── wjvze5r5.betadots.training_facts.yaml │ │ │ ├── x6y6atn4.betadots.training_facts.yaml │ │ │ ├── xcz4msin.betadots.training_facts.yaml │ │ │ ├── xugb63du.betadots.training_facts.yaml │ │ │ ├── y86sacnv.betadots.training_facts.yaml │ │ │ ├── yawsxbez.betadots.training_facts.yaml │ │ │ ├── yfkxxouy.betadots.training_facts.yaml │ │ │ ├── yh4kcbnz.betadots.training_facts.yaml │ │ │ ├── z0f2kl43.betadots.training_facts.yaml │ │ │ ├── zm3qv3cm.betadots.training_facts.yaml │ │ │ ├── 1m73otky.betadots.training_facts.yaml │ │ │ ├── 1tge1wo3.betadots.training_facts.yaml │ │ │ ├── 2288jh8e.betadots.training_facts.yaml │ │ │ ├── 33amc5da.betadots.training_facts.yaml │ │ │ ├── 3ay66ymd.betadots.training_facts.yaml │ │ │ ├── 3bx5fygw.betadots.training_facts.yaml │ │ │ ├── 3i8rrqjx.betadots.training_facts.yaml │ │ │ ├── 3io2n5uh.betadots.training_facts.yaml │ │ │ ├── 3q8ync63.betadots.training_facts.yaml │ │ │ ├── 40sbev55.betadots.training_facts.yaml │ │ │ ├── 4eexoda7.betadots.training_facts.yaml │ │ │ ├── 4jjfyx1h.betadots.training_facts.yaml │ │ │ ├── 5gfpx2k7.betadots.training_facts.yaml │ │ │ ├── 5gv8l8n3.betadots.training_facts.yaml │ │ │ ├── 5npv7v50.betadots.training_facts.yaml │ │ │ ├── 5ruwuuad.betadots.training_facts.yaml │ │ │ ├── 6mlkoauf.betadots.training_facts.yaml │ │ │ ├── 724pbcao.betadots.training_facts.yaml │ │ │ ├── 7jb746rk.betadots.training_facts.yaml │ │ │ ├── 7wdm4xss.betadots.training_facts.yaml │ │ │ ├── 8byzjpzz.betadots.training_facts.yaml │ │ │ ├── 8drk73w4.betadots.training_facts.yaml │ │ │ ├── 8yfl7kiv.betadots.training_facts.yaml │ │ │ ├── 9cvpd0wq.betadots.training_facts.yaml │ │ │ ├── a2st4ipx.betadots.training_facts.yaml │ │ │ ├── arbpv4us.betadots.training_facts.yaml │ │ │ ├── arcnlzkm.betadots.training_facts.yaml │ │ │ ├── b3pcqavv.betadots.training_facts.yaml │ │ │ ├── b4739ubj.betadots.training_facts.yaml │ │ │ ├── bzuvus9e.betadots.training_facts.yaml │ │ │ ├── cn32iom0.betadots.training_facts.yaml │ │ │ ├── cuar01ep.betadots.training_facts.yaml │ │ │ ├── dbrn3h2r.betadots.training_facts.yaml │ │ │ ├── dmk15880.betadots.training_facts.yaml │ │ │ ├── dmpp0nom.betadots.training_facts.yaml │ │ │ ├── e5ujans9.betadots.training_facts.yaml │ │ │ ├── eerukb8k.betadots.training_facts.yaml │ │ │ ├── eztmlf24.betadots.training_facts.yaml │ │ │ ├── fefo79a7.betadots.training_facts.yaml │ │ │ ├── fnp4tnay.betadots.training_facts.yaml │ │ │ ├── g39gaasx.betadots.training_facts.yaml │ │ │ ├── gki2r2ip.betadots.training_facts.yaml │ │ │ ├── gtlhhexp.betadots.training_facts.yaml │ │ │ ├── guku7s0a.betadots.training_facts.yaml │ │ │ ├── guxndq10.betadots.training_facts.yaml │ │ │ ├── gvy8hvhk.betadots.training_facts.yaml │ │ │ ├── gwcu2v40.betadots.training_facts.yaml │ │ │ ├── h9nn849h.betadots.training_facts.yaml │ │ │ ├── hmpbc41u.betadots.training_facts.yaml │ │ │ ├── hs5wnjha.betadots.training_facts.yaml │ │ │ ├── i82jmcn4.betadots.training_facts.yaml │ │ │ ├── iithv1y6.betadots.training_facts.yaml │ │ │ ├── j0dg6jl7.betadots.training_facts.yaml │ │ │ ├── j114trpy.betadots.training_facts.yaml │ │ │ ├── j6kant58.betadots.training_facts.yaml │ │ │ ├── j6p3emfi.betadots.training_facts.yaml │ │ │ ├── jb07smoq.betadots.training_facts.yaml │ │ │ ├── jlua9syg.betadots.training_facts.yaml │ │ │ ├── jo9ilwl3.betadots.training_facts.yaml │ │ │ ├── jxicx59k.betadots.training_facts.yaml │ │ │ ├── k81f2z6y.betadots.training_facts.yaml │ │ │ ├── kgx0whxs.betadots.training_facts.yaml │ │ │ ├── km2gee9p.betadots.training_facts.yaml │ │ │ ├── knbenvbp.betadots.training_facts.yaml │ │ │ ├── l8y7q7tv.betadots.training_facts.yaml │ │ │ ├── lj12xrpa.betadots.training_facts.yaml │ │ │ ├── lj8k5ad6.betadots.training_facts.yaml │ │ │ ├── lnlys2fc.betadots.training_facts.yaml │ │ │ ├── loi6f5y5.betadots.training_facts.yaml │ │ │ ├── lookup.betadots.training_facts.yaml │ │ │ ├── lqytqz41.betadots.training_facts.yaml │ │ │ ├── lxb5xqrm.betadots.training_facts.yaml │ │ │ ├── m5rba5bj.betadots.training_facts.yaml │ │ │ ├── md55vdpb.betadots.training_facts.yaml │ │ │ ├── mlctzqgu.betadots.training_facts.yaml │ │ │ ├── mlr2pox0.betadots.training_facts.yaml │ │ │ ├── msttkvy6.betadots.training_facts.yaml │ │ │ ├── mtbwtip0.betadots.training_facts.yaml │ │ │ ├── nb9ljs79.betadots.training_facts.yaml │ │ │ ├── ndioaov6.betadots.training_facts.yaml │ │ │ ├── nk2gezhe.betadots.training_facts.yaml │ │ │ ├── o4gphsam.betadots.training_facts.yaml │ │ │ ├── on7fexx2.betadots.training_facts.yaml │ │ │ ├── oxnhoxvy.betadots.training_facts.yaml │ │ │ ├── pf3p6pcl.betadots.training_facts.yaml │ │ │ ├── qcmidm7d.betadots.training_facts.yaml │ │ │ ├── qeg3uvik.betadots.training_facts.yaml │ │ │ ├── qf3mu190.betadots.training_facts.yaml │ │ │ ├── qlc3fm46.betadots.training_facts.yaml │ │ │ ├── r48j23ne.betadots.training_facts.yaml │ │ │ ├── r6yzgkef.betadots.training_facts.yaml │ │ │ ├── r7khozne.betadots.training_facts.yaml │ │ │ ├── s3hhgc1r.betadots.training_facts.yaml │ │ │ ├── se3wo5kb.betadots.training_facts.yaml │ │ │ ├── skwdot22.betadots.training_facts.yaml │ │ │ ├── sse8epsu.betadots.training_facts.yaml │ │ │ ├── t7lfr3lc.betadots.training_facts.yaml │ │ │ ├── tdh4p6ix.betadots.training_facts.yaml │ │ │ ├── tgsy3idb.betadots.training_facts.yaml │ │ │ ├── tkytukvc.betadots.training_facts.yaml │ │ │ ├── tpebg47f.betadots.training_facts.yaml │ │ │ ├── u4u2iilk.betadots.training_facts.yaml │ │ │ ├── uai7e89l.betadots.training_facts.yaml │ │ │ ├── uswpm0lf.betadots.training_facts.yaml │ │ │ ├── vo0zsyto.betadots.training_facts.yaml │ │ │ ├── vvo59e81.betadots.training_facts.yaml │ │ │ ├── x5z92y7t.betadots.training_facts.yaml │ │ │ ├── xct89zsu.betadots.training_facts.yaml │ │ │ ├── xda8efsx.betadots.training_facts.yaml │ │ │ ├── xjh5gpa8.betadots.training_facts.yaml │ │ │ ├── xq9xpbvv.betadots.training_facts.yaml │ │ │ ├── xwjwyd98.betadots.training_facts.yaml │ │ │ ├── y7tifexf.betadots.training_facts.yaml │ │ │ ├── yrlqzaph.betadots.training_facts.yaml │ │ │ ├── yy4dijk2.betadots.training_facts.yaml │ │ │ ├── yzeqs4p0.betadots.training_facts.yaml │ │ │ ├── z36n2b2w.betadots.training_facts.yaml │ │ │ ├── zf2l0dws.betadots.training_facts.yaml │ │ │ ├── zp0zr62m.betadots.training_facts.yaml │ │ │ ├── 4msusyei.betadots.training_facts.yaml │ │ │ ├── 60wxmaw5.betadots.training_facts.yaml │ │ │ ├── 7jufapzq.betadots.training_facts.yaml │ │ │ ├── 85759gxe.betadots.training_facts.yaml │ │ │ ├── brskudb1.betadots.training_facts.yaml │ │ │ ├── c93qezs8.betadots.training_facts.yaml │ │ │ ├── fh9nsgeh.betadots.training_facts.yaml │ │ │ ├── gac3g36a.betadots.training_facts.yaml │ │ │ ├── i6y0olsy.betadots.training_facts.yaml │ │ │ ├── m431sdv6.betadots.training_facts.yaml │ │ │ ├── nb8bm3cs.betadots.training_facts.yaml │ │ │ ├── nrl8n1e1.betadots.training_facts.yaml │ │ │ ├── oz2xshky.betadots.training_facts.yaml │ │ │ ├── pc42z1mh.betadots.training_facts.yaml │ │ │ ├── pf96l73p.betadots.training_facts.yaml │ │ │ ├── q1q937xe.betadots.training_facts.yaml │ │ │ ├── qonipr0e.betadots.training_facts.yaml │ │ │ ├── spqyk4jo.betadots.training_facts.yaml │ │ │ ├── stujkvcj.betadots.training_facts.yaml │ │ │ ├── u2lxgwcw.betadots.training_facts.yaml │ │ │ ├── vzv0jhk2.betadots.training_facts.yaml │ │ │ ├── wqo2j9yj.betadots.training_facts.yaml │ │ │ ├── x403skx4.betadots.training_facts.yaml │ │ │ ├── xt15cr0s.betadots.training_facts.yaml │ │ │ ├── zu149i5d.betadots.training_facts.yaml │ │ │ ├── test.host_facts.yaml │ │ │ ├── testhost3_facts.yaml │ │ │ ├── testhost_facts.yaml │ │ │ ├── caegfj58.betadots.training_facts.yaml │ │ │ ├── kq8l8lbw.betadots.training_facts.yaml │ │ │ └── testhost2_facts.yaml │ │ │ ├── generate_nodes.rb │ │ │ └── README.md │ └── users.yml ├── integration │ ├── .keep │ ├── api │ │ └── v1 │ │ │ ├── nodes_test.rb │ │ │ └── environments_test.rb │ └── diff_environments_test.rb ├── factories │ ├── puppet_environments.rb │ ├── group_memberships.rb │ ├── puppet_values.rb │ ├── puppet │ │ └── options.rb │ ├── puppet_configurations.rb │ ├── groups.rb │ ├── puppet_nodes.rb │ └── users.rb ├── support │ ├── openapi.rb │ └── sign_in_helper.rb ├── channels │ └── application_cable │ │ └── connection_test.rb ├── application_system_test_case.rb └── services │ └── puppet_db_client_test.rb ├── app ├── assets │ ├── builds │ │ └── .keep │ ├── images │ │ ├── .keep │ │ ├── betadots.png │ │ └── logo_full.png │ └── config │ │ └── manifest.js ├── models │ ├── concerns │ │ ├── .keep │ │ └── has_groups.rb │ ├── hdm.rb │ ├── current.rb │ ├── group_membership.rb │ ├── hiera_model.rb │ ├── hiera_data │ │ ├── util.rb │ │ ├── layer.rb │ │ ├── layer │ │ │ ├── global.rb │ │ │ └── environment.rb │ │ └── interpolation.rb │ ├── hdm │ │ └── error.rb │ ├── application_record.rb │ ├── saml.rb │ ├── dummy_user.rb │ ├── value.rb │ └── group.rb ├── controllers │ ├── concerns │ │ ├── .keep │ │ └── environment_and_node_concern.rb │ ├── page_controller.rb │ ├── environments_controller.rb │ ├── trees_controller.rb │ ├── api │ │ └── v1 │ │ │ ├── nodes_controller.rb │ │ │ └── environments_controller.rb │ ├── nodes_controller.rb │ ├── encrypted_values_controller.rb │ ├── decrypted_values_controller.rb │ ├── tree_files_controller.rb │ ├── files_controller.rb │ └── group_memberships_controller.rb ├── views │ ├── layouts │ │ ├── mailer.text.erb │ │ └── mailer.html.erb │ ├── environments │ │ ├── index.html.erb │ │ └── _select_environment.html.erb │ ├── lookups │ │ ├── error.html.erb │ │ └── show.html.erb │ ├── page │ │ └── error.html.erb │ ├── keys │ │ ├── _select_env_and_node.html.erb │ │ ├── index.html.erb │ │ ├── _value.html.erb │ │ └── _key_list.html.erb │ ├── groups │ │ ├── new.html.erb │ │ ├── edit.html.erb │ │ └── _rule.html.erb │ ├── trees │ │ └── show.html.erb │ ├── nodes │ │ └── index.html.erb │ ├── users │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── shared │ │ ├── _diff.html.erb │ │ └── _auth_navigation.html.erb │ ├── tree_files │ │ └── show.html.erb │ ├── files │ │ └── _search.html.erb │ ├── sessions │ │ └── new.html.erb │ └── ldap_sessions │ │ └── new.html.erb ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── mailers │ └── application_mailer.rb ├── javascript │ ├── controllers │ │ ├── hello_controller.js │ │ ├── remove_controller.js │ │ ├── application.js │ │ ├── append_controller.js │ │ ├── text_input_navigation_controller.js │ │ ├── select_navigation_controller.js │ │ ├── index.js │ │ └── key_filter_controller.js │ ├── channels │ │ ├── index.js │ │ └── consumer.js │ └── application.js ├── validators │ └── regexp_validator.rb └── jobs │ └── application_job.rb ├── vendor └── javascript │ └── .keep ├── .browserslistrc ├── .ruby-version ├── .tool-versions ├── config ├── initializers │ ├── cancan.rb │ ├── mime_types.rb │ ├── application_controller_renderer.rb │ ├── cookies_serializer.rb │ ├── version.rb │ ├── eyaml.rb │ ├── filter_parameter_logging.rb │ ├── permissions_policy.rb │ ├── wrap_parameters.rb │ ├── backtrace_silencers.rb │ ├── assets.rb │ └── inflections.rb ├── hdm.sysconfig ├── boot.rb ├── environment.rb ├── cable.yml ├── hdm.service ├── importmap.rb ├── database.yml └── ci.rb ├── .github ├── labeler.yml ├── CODEOWNERS └── workflows │ ├── labeler.yml │ └── release.yml ├── Procfile.dev ├── public ├── favicon.ico ├── favicon.png └── robots.txt ├── vagrant ├── hdm │ ├── feat_23498 │ │ ├── data │ │ │ ├── stage │ │ │ │ └── dev.yaml │ │ │ ├── location │ │ │ │ └── local.yaml │ │ │ ├── common.yaml │ │ │ └── nodes │ │ │ │ └── openvox.hdm.workshop.betadots.training.yaml │ │ ├── manifests │ │ │ └── site.pp │ │ ├── hiera.yaml │ │ └── Puppetfile │ ├── production │ │ ├── data │ │ │ ├── stage │ │ │ │ └── dev.yaml │ │ │ └── location │ │ │ │ └── local.yaml │ │ ├── manifests │ │ │ └── site.pp │ │ ├── hiera.yaml │ │ └── Puppetfile │ ├── agent_facts.yaml │ ├── openvox_facts.yaml │ └── hiera.yaml └── sethostname.sh ├── doc └── images │ ├── edit_group.png │ ├── environment.png │ ├── list_groups.png │ ├── login_screen.png │ ├── manage_users.png │ ├── unique_key-1.png │ ├── unique_key-2.png │ ├── create_admin-1.png │ ├── create_admin-2.png │ ├── create_group-1.png │ ├── create_group-2.png │ ├── create_user-1.png │ ├── create_user-2.png │ ├── create_user-3.png │ ├── manage_groups.png │ ├── deep_merge_key-1.png │ ├── deep_merge_key-2.png │ ├── result_single_key.png │ ├── show_environments.png │ ├── admin_login_screen.png │ └── edit_group_members.png ├── bin ├── rake ├── importmap ├── rails ├── dev ├── ci ├── fake_puppet_db ├── rubocop └── entry.sh ├── .markdownlint.yaml ├── .markdownlint-cli2.yaml ├── config.ru ├── db ├── migrate │ ├── 20210201190628_add_name_to_puppet_nodes.rb │ ├── 20250530075140_rename_email_to_username.rb │ ├── 20201115094642_create_roles.rb │ ├── 20210125114028_add_slug_to_puppet_node.rb │ ├── 20210125114050_add_slug_to_puppet_environment.rb │ ├── 20201115120631_create_puppet_environments.rb │ ├── 20210831130006_remove_roles.rb │ ├── 20210326144242_drop_puppet_tables.rb │ ├── 20210901095628_create_groups.rb │ ├── 20210901100018_create_group_memberships.rb │ ├── 20210129053631_create_puppet_values.rb │ ├── 20210203192655_create_puppet_options.rb │ ├── 20231102112138_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb │ ├── 20210831124630_add_admin_flag_to_user.rb │ ├── 20201115095522_create_users.rb │ ├── 20201115120803_create_puppet_nodes.rb │ ├── 20210128201737_create_puppet_configurations.rb │ ├── 20210201194246_add_configurable_to_configurations.rb │ └── 20230419094052_add_role_to_users.rb └── seeds.rb ├── .dockerignore ├── renovate.json ├── FOREMAN_SCREENSHOTS.md ├── CONTRIBUTING.md └── .rubocop.yml /log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | DEVELOP=0 2 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/helpers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/mailers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/models/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/system/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/pids/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/builds/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/controllers/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/integration/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/javascript/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | defaults 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | ruby-3.4.7 2 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/files/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.tool-versions: -------------------------------------------------------------------------------- 1 | ruby 3.4.7 2 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/initializers/cancan.rb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/hdm.rb: -------------------------------------------------------------------------------- 1 | module Hdm 2 | end 3 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/no_config/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/data/nodes/empty.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/environments/index.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "select_environment" %> 2 | -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | --- 2 | skip-changelog: 3 | - head-branch: ['^release-*'] 4 | -------------------------------------------------------------------------------- /Procfile.dev: -------------------------------------------------------------------------------- 1 | web: bin/rails server -p 3000 2 | css: bin/rails dartsass:watch 3 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/public/favicon.png -------------------------------------------------------------------------------- /vagrant/hdm/feat_23498/data/stage/dev.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | chrony::server: 3 | - '172.16.22.56' 4 | -------------------------------------------------------------------------------- /vagrant/hdm/production/data/stage/dev.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | chrony::server: 3 | - '172.16.22.56' 4 | -------------------------------------------------------------------------------- /doc/images/edit_group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/edit_group.png -------------------------------------------------------------------------------- /vagrant/hdm/agent_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | custom_fact: 3 | location: 'dmz' 4 | stage: 'prod' 5 | -------------------------------------------------------------------------------- /vagrant/hdm/openvox_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | custom_fact: 3 | location: 'local' 4 | stage: 'dev' 5 | -------------------------------------------------------------------------------- /doc/images/environment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/environment.png -------------------------------------------------------------------------------- /doc/images/list_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/list_groups.png -------------------------------------------------------------------------------- /doc/images/login_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/login_screen.png -------------------------------------------------------------------------------- /doc/images/manage_users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/manage_users.png -------------------------------------------------------------------------------- /doc/images/unique_key-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/unique_key-1.png -------------------------------------------------------------------------------- /doc/images/unique_key-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/unique_key-2.png -------------------------------------------------------------------------------- /test/fixtures/files/puppet/global/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm::integer: 99 3 | hdm::float: 2.3 4 | -------------------------------------------------------------------------------- /vagrant/hdm/feat_23498/data/location/local.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | chrony::servers: 3 | - '192.168.100.234' 4 | -------------------------------------------------------------------------------- /vagrant/hdm/production/data/location/local.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | chrony::servers: 3 | - '192.168.100.234' 4 | -------------------------------------------------------------------------------- /app/assets/images/betadots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/app/assets/images/betadots.png -------------------------------------------------------------------------------- /app/models/current.rb: -------------------------------------------------------------------------------- 1 | class Current < ActiveSupport::CurrentAttributes 2 | attribute :user 3 | end 4 | -------------------------------------------------------------------------------- /doc/images/create_admin-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/create_admin-1.png -------------------------------------------------------------------------------- /doc/images/create_admin-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/create_admin-2.png -------------------------------------------------------------------------------- /doc/images/create_group-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/create_group-1.png -------------------------------------------------------------------------------- /doc/images/create_group-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/create_group-2.png -------------------------------------------------------------------------------- /doc/images/create_user-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/create_user-1.png -------------------------------------------------------------------------------- /doc/images/create_user-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/create_user-2.png -------------------------------------------------------------------------------- /doc/images/create_user-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/create_user-3.png -------------------------------------------------------------------------------- /doc/images/manage_groups.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/manage_groups.png -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/environment.conf: -------------------------------------------------------------------------------- 1 | modulepath = site:$basemodulepath 2 | -------------------------------------------------------------------------------- /app/assets/images/logo_full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/app/assets/images/logo_full.png -------------------------------------------------------------------------------- /config/hdm.sysconfig: -------------------------------------------------------------------------------- 1 | SECRET_KEY_BASE=supersecret 2 | BIND=0.0.0.0 3 | PORT=3000 4 | ENVIRONMENT=production 5 | -------------------------------------------------------------------------------- /doc/images/deep_merge_key-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/deep_merge_key-1.png -------------------------------------------------------------------------------- /doc/images/deep_merge_key-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/deep_merge_key-2.png -------------------------------------------------------------------------------- /doc/images/result_single_key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/result_single_key.png -------------------------------------------------------------------------------- /doc/images/show_environments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/show_environments.png -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative "../config/boot" 3 | require "rake" 4 | Rake.application.run 5 | -------------------------------------------------------------------------------- /doc/images/admin_login_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/admin_login_screen.png -------------------------------------------------------------------------------- /doc/images/edit_group_members.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/betadots/hdm/HEAD/doc/images/edit_group_members.png -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/globs/data/common/hdm.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm::float: 0.1 3 | hdm::integer: 1 4 | -------------------------------------------------------------------------------- /bin/importmap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require_relative "../config/application" 4 | require "importmap/commands" 5 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/global/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | -------------------------------------------------------------------------------- /app/models/group_membership.rb: -------------------------------------------------------------------------------- 1 | class GroupMembership < ApplicationRecord 2 | belongs_to :user 3 | belongs_to :group 4 | end 5 | -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Channel < ActionCable::Channel::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/minimal/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/no_datadir/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 5 3 | 4 | defaults: 5 | lookup_key: eyaml_lookup_key 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/old_unused/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | -------------------------------------------------------------------------------- /vagrant/sethostname.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | hostn=$1 3 | echo "### Setting hostname ${hostn}" 4 | hostnamectl set-hostname --static $hostn 5 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | default: true 3 | 4 | line-length: 5 | line_length: 210 6 | descriptive-link-text: false 7 | no-alt-text: false 8 | -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | module ApplicationCable 2 | class Connection < ActionCable::Connection::Base 3 | end 4 | end 5 | -------------------------------------------------------------------------------- /test/factories/puppet_environments.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :puppet_environment do 3 | name { "MyString" } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | class ApplicationMailer < ActionMailer::Base 2 | default from: 'from@example.com' 3 | layout 'mailer' 4 | end 5 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/globs/data/nodes/testhost2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | foobar::firstrun::linux_classes: 3 | hostname: common::hostname2 4 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) 2 | 3 | require "bundler/setup" # Set up gems listed in the Gemfile. 4 | -------------------------------------------------------------------------------- /test/factories/group_memberships.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :group_membership do 3 | user { nil } 4 | group { nil } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/data/nodes/testhost2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | foobar::firstrun::linux_classes: 3 | hostname: common::hostname2 4 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/dynamic_datadir/data1/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm::float: 0.1 3 | hdm::integer: 1 4 | foobar::enable_firstrun: false 5 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/dynamic_datadir/data2/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm::float: 0.3 3 | hdm::integer: 4 4 | foobar::enable_firstrun: true 5 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_PATH = File.expand_path("../config/application", __dir__) 3 | require_relative "../config/boot" 4 | require "rails/commands" 5 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/hdm/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | hierarchy: 3 | - name: "Common" 4 | data_hash: yaml_data 5 | path: "common.yaml" 6 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # Load the Rails application. 2 | require_relative "application" 3 | 4 | # Initialize the Rails application. 5 | Rails.application.initialize! 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/multiple_hierarchies/data/zone/internal.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | profile::auth::sshd_config_allowgroups: 3 | - 'admins' 4 | - 'devs' 5 | 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/v3/hiera.yaml: -------------------------------------------------------------------------------- 1 | backends: 2 | - yaml 3 | hierarchy: 4 | - nodes/%{::trusted.certname} 5 | - common 6 | merge_behavior: native 7 | -------------------------------------------------------------------------------- /app/views/lookups/error.html.erb: -------------------------------------------------------------------------------- 1 | <%= turbo_frame_tag "lookup-result-frame" do %> 2 |

3 | <%= @error.message %> 4 |

5 | <% end %> 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/multiple_hierarchies/data/nodes/4msusyei.betadots.training.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | profile::auth::sshd_config_allowgroups: 3 | - 'admins' 4 | 5 | -------------------------------------------------------------------------------- /.markdownlint-cli2.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | ignores: 3 | - .github/** 4 | - .idea/** 5 | - .vendor/** 6 | - .vscode/** 7 | - CHANGELOG.md 8 | - test/** 9 | - vendor/** 10 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/site/testmod/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm::float: 0.75 3 | hdm::integer: 74 4 | testmod::float: 5.61 5 | testmod::integer: 12 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/enterprise/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 5 3 | 4 | hierarchy: 5 | - name: Classifier Configuration Data 6 | data_hash: classifier_data 7 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/hdm/modules/testmod/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | a: value a (from testmod, should be ignored) 3 | testmod::float: 9.74 4 | testmod::integer: 29 5 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/1a9c576a.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '1a9c576a.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/1h46n83n.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '1h46n83n.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/29hjakkw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '29hjakkw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/2l8ol0i5.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '2l8ol0i5.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/2r0bw6xn.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '2r0bw6xn.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/2u0d1fei.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '2u0d1fei.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/535ffe1u.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '535ffe1u.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/74h24eg9.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '74h24eg9.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/7c6k7ouc.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '7c6k7ouc.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/80fao3k3.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '80fao3k3.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/8119nqs7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '8119nqs7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ajpe03ov.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ajpe03ov.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/bixzjm53.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'bixzjm53.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/crffyobe.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'crffyobe.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/cwgel3zg.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'cwgel3zg.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/czhn2a3x.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'czhn2a3x.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/dui861cn.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'dui861cn.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ez243lch.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ez243lch.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/f2f7nbka.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'f2f7nbka.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/fqyn3gv9.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'fqyn3gv9.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/gkxa25er.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'gkxa25er.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/h2vjgbw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'h2vjgbw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/hol8la5o.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'hol8la5o.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/k0e042a8.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'k0e042a8.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/khlktohq.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'khlktohq.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/n34tbmpi.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'n34tbmpi.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ncamizgh.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ncamizgh.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/o3tzui7b.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'o3tzui7b.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/p5ufmvb0.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'p5ufmvb0.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/pfztw7li.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'pfztw7li.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/pgysn5ry.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'pgysn5ry.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/q8o2i1tz.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'q8o2i1tz.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/rs2bxbd0.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'rs2bxbd0.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/siu7z4w7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'siu7z4w7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/slwbfc40.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'slwbfc40.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/szssayw3.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'szssayw3.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/t4k08lp.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 't4k08lp.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/tae1yz1.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'tae1yz1.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/tbgmw5we.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'tbgmw5we.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/umx7463y.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'umx7463y.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/uyiwu2st.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'uyiwu2st.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/vbz66ux7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'vbz66ux7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/wbwz457d.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'wbwz457d.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/won7vzfm.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'won7vzfm.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/wpo98zhp.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'wpo98zhp.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/x4llfki8.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'x4llfki8.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xkpgjql8.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xkpgjql8.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ycrxjn7a.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ycrxjn7a.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yg9kk39i.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yg9kk39i.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yjxyvzc1.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yjxyvzc1.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'hdm' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/z36imxyv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'z36imxyv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/z8ybtb4h.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'z8ybtb4h.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ze729k57.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ze729k57.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'test' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/globs/data/role/hdm_test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | foobar::firstrun::linux_classes: 3 | hostname: hostname-role 4 | hdm::integer: 1 5 | hdm::float: 4.5 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/1jyln4zc.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '1jyln4zc.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/1k4kahf9.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '1k4kahf9.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/2bvp6vcc.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '2bvp6vcc.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/3p2fr29k.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '3p2fr29k.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'minimal' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/45kzd3l5.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '45kzd3l5.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/482krqn7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '482krqn7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/56w57wwr.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '56w57wwr.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/5f6zzx25.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '5f6zzx25.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/5lzg8kq4.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '5lzg8kq4.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/5qud69fw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '5qud69fw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/6iijj7sn.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '6iijj7sn.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/6mwwmsgg.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '6mwwmsgg.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/6xnchxhs.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '6xnchxhs.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/7jfq1drl.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '7jfq1drl.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/7lglxdpg.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '7lglxdpg.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/7uc8566.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '7uc8566.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/8pripw5v.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '8pripw5v.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/90f923dr.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '90f923dr.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/922r0yzv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '922r0yzv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'minimal' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/98qhkysp.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '98qhkysp.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/9n11tuzg.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '9n11tuzg.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/9t8nhoux.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '9t8nhoux.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/aej86kp6.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'aej86kp6.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ahi53aeb.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ahi53aeb.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ax8ornqr.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ax8ornqr.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/b548zrva.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'b548zrva.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/b8sp7obs.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'b8sp7obs.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/bvgbu2fl.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'bvgbu2fl.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/cgaplboi.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'cgaplboi.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/d3r3tytg.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'd3r3tytg.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/d4gq3103.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'd4gq3103.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/d4y2k0qq.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'd4y2k0qq.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/d9fpj14l.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'd9fpj14l.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/dhplrtv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'dhplrtv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/dtwhf73e.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'dtwhf73e.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/exs6mbyb.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'exs6mbyb.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'minimal' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/f6obrt1u.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'f6obrt1u.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/fcqtpjn7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'fcqtpjn7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/fj2yfmw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'fj2yfmw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/fpehst39.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'fpehst39.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/g227pkf7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'g227pkf7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/g59avopl.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'g59avopl.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/g9yi8tjz.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'g9yi8tjz.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/glfhgp33.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'glfhgp33.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/gw1ulcb7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'gw1ulcb7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/h3l1v58e.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'h3l1v58e.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/h3s4iuga.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'h3s4iuga.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/hnp1da30.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'hnp1da30.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/jl4rhfpm.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'jl4rhfpm.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/m4fnq58u.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'm4fnq58u.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/mrp77rad.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'mrp77rad.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ndic5wz7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ndic5wz7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ns8gwxg3.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ns8gwxg3.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/o2orlwe5.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'o2orlwe5.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/oa2j8g47.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'oa2j8g47.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/otibr6d1.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'otibr6d1.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/qo10agon.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'qo10agon.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ss4twzpr.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ss4twzpr.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/sszlxacw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'sszlxacw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/sw15xa6y.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'sw15xa6y.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/szw86yk4.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'szw86yk4.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ttns843o.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ttns843o.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/u2s1rcqu.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'u2s1rcqu.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/upjxmekx.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'upjxmekx.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/v4c13rht.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'v4c13rht.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/vim0dogq.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'vim0dogq.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/vxkc5b8p.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'vxkc5b8p.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'minimal' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/w12bh6f8.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'w12bh6f8.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/wh2fvmnb.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'wh2fvmnb.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/wjvze5r5.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'wjvze5r5.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/x6y6atn4.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'x6y6atn4.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xcz4msin.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xcz4msin.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xugb63du.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xugb63du.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'no_config' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/y86sacnv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'y86sacnv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yawsxbez.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yawsxbez.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'eyaml' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yfkxxouy.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yfkxxouy.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yh4kcbnz.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yh4kcbnz.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/z0f2kl43.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'z0f2kl43.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'minimal' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/zm3qv3cm.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'zm3qv3cm.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'globs' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # This file is used by Rack-based servers to start the application. 2 | 3 | require_relative "config/environment" 4 | 5 | run Rails.application 6 | Rails.application.load_server 7 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/data/role/hdm_test.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | foobar::firstrun::linux_classes: 3 | hostname: hostname-role 4 | hdm::integer: 1 5 | hdm::float: 2.3 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/empty_defaults/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 5 3 | defaults: 4 | hierarchy: 5 | - name: "common settings" 6 | paths: 7 | - "common.yaml" 8 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/1m73otky.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '1m73otky.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/1tge1wo3.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '1tge1wo3.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/2288jh8e.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '2288jh8e.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/33amc5da.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '33amc5da.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/3ay66ymd.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '3ay66ymd.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/3bx5fygw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '3bx5fygw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/3i8rrqjx.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '3i8rrqjx.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/3io2n5uh.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '3io2n5uh.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/3q8ync63.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '3q8ync63.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/40sbev55.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '40sbev55.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/4eexoda7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '4eexoda7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/4jjfyx1h.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '4jjfyx1h.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/5gfpx2k7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '5gfpx2k7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/5gv8l8n3.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '5gv8l8n3.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/5npv7v50.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '5npv7v50.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/5ruwuuad.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '5ruwuuad.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/6mlkoauf.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '6mlkoauf.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/724pbcao.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '724pbcao.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/7jb746rk.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '7jb746rk.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/7wdm4xss.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '7wdm4xss.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/8byzjpzz.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '8byzjpzz.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/8drk73w4.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '8drk73w4.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/8yfl7kiv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '8yfl7kiv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/9cvpd0wq.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '9cvpd0wq.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/a2st4ipx.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'a2st4ipx.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/arbpv4us.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'arbpv4us.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/arcnlzkm.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'arcnlzkm.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/b3pcqavv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'b3pcqavv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/b4739ubj.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'b4739ubj.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/bzuvus9e.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'bzuvus9e.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/cn32iom0.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'cn32iom0.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/cuar01ep.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'cuar01ep.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/dbrn3h2r.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'dbrn3h2r.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/dmk15880.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'dmk15880.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/dmpp0nom.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'dmpp0nom.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/e5ujans9.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'e5ujans9.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/eerukb8k.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'eerukb8k.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/eztmlf24.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'eztmlf24.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/fefo79a7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'fefo79a7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/fnp4tnay.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'fnp4tnay.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/g39gaasx.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'g39gaasx.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/gki2r2ip.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'gki2r2ip.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/gtlhhexp.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'gtlhhexp.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/guku7s0a.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'guku7s0a.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/guxndq10.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'guxndq10.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/gvy8hvhk.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'gvy8hvhk.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/gwcu2v40.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'gwcu2v40.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/h9nn849h.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'h9nn849h.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/hmpbc41u.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'hmpbc41u.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/hs5wnjha.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'hs5wnjha.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/i82jmcn4.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'i82jmcn4.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/iithv1y6.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'iithv1y6.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/j0dg6jl7.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'j0dg6jl7.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/j114trpy.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'j114trpy.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/j6kant58.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'j6kant58.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/j6p3emfi.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'j6p3emfi.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/jb07smoq.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'jb07smoq.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/jlua9syg.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'jlua9syg.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/jo9ilwl3.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'jo9ilwl3.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/jxicx59k.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'jxicx59k.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/k81f2z6y.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'k81f2z6y.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/kgx0whxs.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'kgx0whxs.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/km2gee9p.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'km2gee9p.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/knbenvbp.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'knbenvbp.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/l8y7q7tv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'l8y7q7tv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/lj12xrpa.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'lj12xrpa.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/lj8k5ad6.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'lj8k5ad6.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/lnlys2fc.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'lnlys2fc.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/loi6f5y5.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'loi6f5y5.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/lookup.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'lookup.betadots.training' 3 | role: 'test_role' 4 | environment: 'lookup_tests' 5 | zone: 'test_zone' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/lqytqz41.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'lqytqz41.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/lxb5xqrm.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'lxb5xqrm.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/m5rba5bj.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'm5rba5bj.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/md55vdpb.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'md55vdpb.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/mlctzqgu.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'mlctzqgu.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/mlr2pox0.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'mlr2pox0.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/msttkvy6.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'msttkvy6.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/mtbwtip0.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'mtbwtip0.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/nb9ljs79.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'nb9ljs79.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/ndioaov6.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'ndioaov6.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/nk2gezhe.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'nk2gezhe.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/o4gphsam.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'o4gphsam.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/on7fexx2.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'on7fexx2.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/oxnhoxvy.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'oxnhoxvy.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/pf3p6pcl.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'pf3p6pcl.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/qcmidm7d.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'qcmidm7d.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/qeg3uvik.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'qeg3uvik.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/qf3mu190.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'qf3mu190.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/qlc3fm46.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'qlc3fm46.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/r48j23ne.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'r48j23ne.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/r6yzgkef.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'r6yzgkef.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/r7khozne.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'r7khozne.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/s3hhgc1r.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 's3hhgc1r.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/se3wo5kb.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'se3wo5kb.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/skwdot22.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'skwdot22.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/sse8epsu.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'sse8epsu.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/t7lfr3lc.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 't7lfr3lc.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/tdh4p6ix.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'tdh4p6ix.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/tgsy3idb.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'tgsy3idb.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/tkytukvc.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'tkytukvc.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/tpebg47f.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'tpebg47f.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/u4u2iilk.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'u4u2iilk.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/uai7e89l.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'uai7e89l.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/uswpm0lf.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'uswpm0lf.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/vo0zsyto.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'vo0zsyto.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/vvo59e81.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'vvo59e81.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/x5z92y7t.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'x5z92y7t.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xct89zsu.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xct89zsu.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xda8efsx.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xda8efsx.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xjh5gpa8.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xjh5gpa8.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xq9xpbvv.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xq9xpbvv.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xwjwyd98.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xwjwyd98.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/y7tifexf.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'y7tifexf.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yrlqzaph.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yrlqzaph.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yy4dijk2.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yy4dijk2.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/yzeqs4p0.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'yzeqs4p0.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/z36n2b2w.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'z36n2b2w.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/zf2l0dws.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'zf2l0dws.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/zp0zr62m.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'zp0zr62m.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/models/group_membership_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class GroupMembershipTest < ActiveSupport::TestCase 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/hiera_model.rb: -------------------------------------------------------------------------------- 1 | class HieraModel 2 | include ActiveModel::Model 3 | include ActiveModel::Attributes 4 | include ActiveModel::Serializers::JSON 5 | 6 | attribute :hiera_data 7 | end 8 | -------------------------------------------------------------------------------- /bin/dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | if ! command -v foreman &> /dev/null 4 | then 5 | echo "Installing foreman..." 6 | gem install foreman 7 | fi 8 | 9 | foreman start -f Procfile.dev 10 | -------------------------------------------------------------------------------- /db/migrate/20210201190628_add_name_to_puppet_nodes.rb: -------------------------------------------------------------------------------- 1 | class AddNameToPuppetNodes < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :puppet_nodes, :name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20250530075140_rename_email_to_username.rb: -------------------------------------------------------------------------------- 1 | class RenameEmailToUsername < ActiveRecord::Migration[8.0] 2 | def change 3 | rename_column :users, :email, :username 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /test/factories/puppet_values.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :puppet_value do 3 | value { "MyString" } 4 | slug { "MyString" } 5 | puppet_configuration { nil } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/multiple_hierarchies/data/nodes/60wxmaw5.betadots.training.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | lookup_options: 3 | 'profile::auth::sshd_config_allowgroups': 4 | merge: first 5 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/4msusyei.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '4msusyei.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/60wxmaw5.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '60wxmaw5.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/7jufapzq.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '7jufapzq.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/85759gxe.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: '85759gxe.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/brskudb1.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'brskudb1.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/c93qezs8.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'c93qezs8.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/fh9nsgeh.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'fh9nsgeh.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/gac3g36a.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'gac3g36a.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/i6y0olsy.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'i6y0olsy.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/m431sdv6.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'm431sdv6.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/nb8bm3cs.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'nb8bm3cs.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/nrl8n1e1.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'nrl8n1e1.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/oz2xshky.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'oz2xshky.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/pc42z1mh.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'pc42z1mh.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/pf96l73p.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'pf96l73p.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/q1q937xe.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'q1q937xe.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/qonipr0e.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'qonipr0e.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/spqyk4jo.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'spqyk4jo.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/stujkvcj.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'stujkvcj.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/u2lxgwcw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'u2lxgwcw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/vzv0jhk2.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'vzv0jhk2.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/wqo2j9yj.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'wqo2j9yj.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/x403skx4.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'x403skx4.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/xt15cr0s.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'xt15cr0s.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/zu149i5d.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'zu149i5d.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'multiple_hierarchies' 5 | zone: 'internal' 6 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new mime types for use in respond_to blocks: 4 | # Mime::Type.register "text/richtext", :rtf 5 | -------------------------------------------------------------------------------- /test/controllers/files_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class FilesControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/controllers/groups_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class GroupsControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/controllers/values_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ValuesControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .bundle/ 2 | .dockerignore 3 | .git/ 4 | .github/ 5 | .gitignore 6 | .vagrant/ 7 | db/*.sqlite3 8 | docker-compose.yml 9 | Gemfile.lock 10 | screenshots/ 11 | vendor/bundle 12 | vagrant 13 | -------------------------------------------------------------------------------- /bin/ci: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require_relative "../config/boot" 3 | require "active_support/continuous_integration" 4 | 5 | CI = ActiveSupport::ContinuousIntegration 6 | require_relative "../config/ci.rb" 7 | -------------------------------------------------------------------------------- /test/controllers/lookups_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class LookupsControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /app/views/page/error.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
HDM Error
3 |
4 |

<%= @error %>

5 |
6 |
7 | -------------------------------------------------------------------------------- /test/factories/puppet/options.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :puppet_option, class: 'Puppet::Option' do 3 | name { "MyString" } 4 | slug { "MyString" } 5 | puppet_node { nil } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/test.host_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'test.host' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | os: 7 | family: 'RedHat' 8 | organization: 'internal' 9 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/testhost3_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'testhost3' 3 | role: 'hdm_test3' 4 | environment: 'development' 5 | zone: 'internal' 6 | os: 7 | family: 'RedHat' 8 | organization: 'external' 9 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/testhost_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'testhost' 3 | role: 'hdm_test' 4 | environment: 'development' 5 | zone: 'internal' 6 | os: 7 | family: 'RedHat' 8 | organization: 'internal' 9 | -------------------------------------------------------------------------------- /app/models/hiera_data/util.rb: -------------------------------------------------------------------------------- 1 | class HieraData 2 | module Util 3 | module_function 4 | 5 | def yaml_format(value) 6 | value.to_yaml.sub(/\A---(\n| )/, '').chomp 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_tree ../builds 3 | //= link_tree ../../javascript .js 4 | //= link_tree ../../../vendor/javascript .js 5 | //= link bootstrap 6 | //= link application.css 7 | -------------------------------------------------------------------------------- /app/javascript/controllers/hello_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from "@hotwired/stimulus" 2 | 3 | export default class extends Controller { 4 | connect() { 5 | this.element.textContent = "Hello World!" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/controllers/group_memberships_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class GroupMembershipsControllerTest < ActionDispatch::IntegrationTest 4 | # test "the truth" do 5 | # assert true 6 | # end 7 | end 8 | -------------------------------------------------------------------------------- /test/factories/puppet_configurations.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :puppet_configuration do 3 | name { "MyString" } 4 | slug { "MyString" } 5 | puppet_node_id { 1 } 6 | parent_id { 1 } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/caegfj58.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'caegfj58.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'dynamic_datadir' 5 | zone: 'internal' 6 | custom: 7 | datadir: 'data1' 8 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/kq8l8lbw.betadots.training_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'kq8l8lbw.betadots.training' 3 | role: 'hdm_test' 4 | environment: 'dynamic_datadir' 5 | zone: 'internal' 6 | custom: 7 | datadir: 'data2' 8 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Lines starting with '#' are comments. 2 | # Each line is a file pattern followed by one or more owners. 3 | 4 | # These owners will be the default owners for everything in the repo. 5 | * @betadots/reviewers 6 | -------------------------------------------------------------------------------- /db/migrate/20201115094642_create_roles.rb: -------------------------------------------------------------------------------- 1 | class CreateRoles < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :roles do |t| 4 | t.string :name 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/keys/_select_env_and_node.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= render "environments/select_environment" %> 4 |
5 |
6 | <%= render "nodes/select_node" %> 7 |
8 |
9 | -------------------------------------------------------------------------------- /db/migrate/20210125114028_add_slug_to_puppet_node.rb: -------------------------------------------------------------------------------- 1 | class AddSlugToPuppetNode < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :puppet_nodes, :slug, :string 4 | add_index :puppet_nodes, :slug, unique: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/hdm/modules/testmod/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "testmod defaults" 8 | paths: 9 | - "common.yaml" 10 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/site/testmod/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "testmod defaults" 8 | paths: 9 | - "common.yaml" 10 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/nodes/testhost2_facts.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | fqdn: 'testhost2' 3 | role: 'hdm_test2' 4 | environment: 'development' 5 | zone: 'internal' 6 | os: 7 | family: 'Debian' 8 | lsbdistcodename: 'Jessi' 9 | organization: 'internal' 10 | -------------------------------------------------------------------------------- /app/javascript/channels/index.js: -------------------------------------------------------------------------------- 1 | // Load all the channels within this directory and all subdirectories. 2 | // Channel files must be named *_channel.js. 3 | 4 | const channels = require.context('.', true, /_channel\.js$/) 5 | channels.keys().forEach(channels) 6 | -------------------------------------------------------------------------------- /bin/fake_puppet_db: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'rackup' 4 | require_relative '../test/support/fake_puppet_db' 5 | 6 | ENV["PIDFILE"] ||= "tmp/pids/fake_puppet_db.pid" 7 | 8 | Rackup::Server.start(app: FakePuppetDB.new, Host: 'localhost', Port: 8083) 9 | -------------------------------------------------------------------------------- /app/javascript/application.js: -------------------------------------------------------------------------------- 1 | // Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails 2 | import "@hotwired/turbo-rails" 3 | import "controllers" 4 | 5 | import * as Popper from "@popperjs/core" 6 | import "bootstrap" 7 | -------------------------------------------------------------------------------- /app/views/keys/index.html.erb: -------------------------------------------------------------------------------- 1 | <%= render "select_env_and_node" %> 2 | 3 | <%= render "nodes/info" %> 4 | 5 |
6 |
7 | <%= render "key_list" %> 8 |
9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /vagrant/hdm/feat_23498/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | lookup_options: 3 | classes: 4 | merge: 'deep' 5 | 6 | classes: {} 7 | 8 | profile::base::additional_packages: 9 | - 'htop' 10 | 11 | chrony::servers: 12 | - '10.100.22.44' 13 | - '10.101.44.22' 14 | -------------------------------------------------------------------------------- /app/javascript/controllers/remove_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from "@hotwired/stimulus" 2 | 3 | export default class extends Controller { 4 | remove(event) { 5 | event.preventDefault(); 6 | this.element.parentNode.removeChild(this.element); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /db/migrate/20210125114050_add_slug_to_puppet_environment.rb: -------------------------------------------------------------------------------- 1 | class AddSlugToPuppetEnvironment < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :puppet_environments, :slug, :string 4 | add_index :puppet_environments, :slug, unique: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20201115120631_create_puppet_environments.rb: -------------------------------------------------------------------------------- 1 | class CreatePuppetEnvironments < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :puppet_environments do |t| 4 | t.string :name 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "addLabels": ["renovate", "dependencies"], 4 | "assigneesFromCodeOwners": true, 5 | "dependencyDashboard": true, 6 | "automerge": true, 7 | "automergeType": "pr" 8 | } 9 | -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: redis 3 | url: redis://localhost:6379/1 4 | 5 | test: 6 | adapter: test 7 | 8 | production: 9 | adapter: redis 10 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 11 | channel_prefix: hdm_production 12 | -------------------------------------------------------------------------------- /test/controllers/api/v1/keys_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | module Api 4 | module V1 5 | class KeysControllerTest < ActionDispatch::IntegrationTest 6 | # test "the truth" do 7 | # assert true 8 | # end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /test/controllers/api/v1/nodes_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | module Api 4 | module V1 5 | class NodesControllerTest < ActionDispatch::IntegrationTest 6 | # test "the truth" do 7 | # assert true 8 | # end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/models/hdm/error.rb: -------------------------------------------------------------------------------- 1 | module Hdm 2 | class Error < ::StandardError 3 | def initialize(msg_or_error) 4 | if msg_or_error.is_a?(Exception) 5 | super("#{msg_or_error.class}: #{msg_or_error}") 6 | else 7 | super 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # ActiveSupport::Reloader.to_prepare do 4 | # ApplicationController.renderer.defaults.merge!( 5 | # http_host: 'example.org', 6 | # https: false 7 | # ) 8 | # end 9 | -------------------------------------------------------------------------------- /app/javascript/controllers/application.js: -------------------------------------------------------------------------------- 1 | import { Application } from "@hotwired/stimulus" 2 | 3 | const application = Application.start() 4 | 5 | // Configure Stimulus development experience 6 | application.debug = false 7 | window.Stimulus = application 8 | 9 | export { application } 10 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Specify a serializer for the signed and encrypted cookie jars. 4 | # Valid options are :json, :marshal, and :hybrid. 5 | Rails.application.config.action_dispatch.cookies_serializer = :json 6 | -------------------------------------------------------------------------------- /config/initializers/version.rb: -------------------------------------------------------------------------------- 1 | Hdm::VERSION = if File.exist? '/VERSION' 2 | File.read('/VERSION') 3 | elsif system("git --version > /dev/null 2>&1") 4 | `git describe`.strip 5 | else 6 | 'unknown' 7 | end 8 | -------------------------------------------------------------------------------- /test/controllers/api/v1/environments_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | module Api 4 | module V1 5 | class EnvironmentsControllerTest < ActionDispatch::IntegrationTest 6 | # test "the truth" do 7 | # assert true 8 | # end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /bin/rubocop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require "rubygems" 3 | require "bundler/setup" 4 | 5 | # Explicit RuboCop config increases performance slightly while avoiding config confusion. 6 | ARGV.unshift("--config", File.expand_path("../.rubocop.yml", __dir__)) 7 | 8 | load Gem.bin_path("rubocop", "rubocop") 9 | -------------------------------------------------------------------------------- /db/migrate/20210831130006_remove_roles.rb: -------------------------------------------------------------------------------- 1 | class RemoveRoles < ActiveRecord::Migration[6.1] 2 | def change 3 | remove_reference :users, :role, foreign_key: true, null: false 4 | 5 | drop_table :roles do |t| 6 | t.string :name 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/dynamic_datadir/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | data_hash: yaml_data 4 | 5 | hierarchy: 6 | - name: "dynamic hierarchy" 7 | datadir: "%{facts.custom.datadir}" 8 | paths: 9 | - "nodes/%{::facts.fqdn}.yaml" 10 | - "common.yaml" 11 | -------------------------------------------------------------------------------- /test/support/openapi.rb: -------------------------------------------------------------------------------- 1 | # require "rspec-openapi" 2 | 3 | RSpec::OpenAPI.info = { 4 | title: "HDM API v1", 5 | summary: "API to query hiera data from HDM" 6 | } 7 | 8 | RSpec::OpenAPI.security_schemes = { 9 | "BasicAuth" => { 10 | type: "http", 11 | scheme: "basic" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🏷️ Pull Request Labeler 3 | 4 | on: 5 | pull_request_target: {} 6 | 7 | jobs: 8 | labeler: 9 | permissions: 10 | contents: read 11 | pull-requests: write 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/labeler@v6 15 | -------------------------------------------------------------------------------- /app/validators/regexp_validator.rb: -------------------------------------------------------------------------------- 1 | class RegexpValidator < ActiveModel::EachValidator 2 | def validate_each(record, attribute, values) 3 | Array(values).each do |value| 4 | Regexp.new(value) 5 | end 6 | rescue RegexpError 7 | record.errors.add(attribute, :invalid) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/groups/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

New Group

3 | 4 | <%= render 'form', group: @group %> 5 | 6 |
7 | 8 | <%= link_to groups_path, class:"btn btn-light min-width-btn" do %> 9 | <%= icon "arrow-left-short" %> 10 | Back 11 | <% end %> 12 |
13 | -------------------------------------------------------------------------------- /app/javascript/channels/consumer.js: -------------------------------------------------------------------------------- 1 | // Action Cable provides the framework to deal with WebSockets in Rails. 2 | // You can generate new channels where WebSocket features live using the `rails generate channel` command. 3 | 4 | import { createConsumer } from "@rails/actioncable" 5 | 6 | export default createConsumer() 7 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | class ApplicationJob < ActiveJob::Base 2 | # Automatically retry jobs that encountered a deadlock 3 | # retry_on ActiveRecord::Deadlocked 4 | 5 | # Most jobs are safe to ignore if the underlying records are no longer available 6 | # discard_on ActiveJob::DeserializationError 7 | end 8 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | class ApplicationRecord < ActiveRecord::Base 2 | self.abstract_class = true 3 | 4 | before_destroy :ensure_destruction_possible 5 | 6 | private 7 | 8 | def ensure_destruction_possible 9 | throw :abort if respond_to?(:destroyable?) && !destroyable? 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/templates/erb/scaffold/new.html.erb.tt: -------------------------------------------------------------------------------- 1 |
2 |

New <%= singular_table_name.titleize %>

3 | <%%= render 'form', <%= singular_table_name %>: @<%= singular_table_name %> %> 4 |
5 | <%%= link_to 'Back', <%= index_helper %>_path, class:"btn btn-light min-width-btn" %> 6 |
-------------------------------------------------------------------------------- /db/migrate/20210326144242_drop_puppet_tables.rb: -------------------------------------------------------------------------------- 1 | class DropPuppetTables < ActiveRecord::Migration[6.1] 2 | def change 3 | drop_table :puppet_configurations 4 | drop_table :puppet_environments 5 | drop_table :puppet_nodes 6 | drop_table :puppet_options 7 | drop_table :puppet_values 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/controllers/page_controller.rb: -------------------------------------------------------------------------------- 1 | class PageController < ApplicationController 2 | skip_before_action :authentication_required 3 | 4 | add_breadcrumb "Home", :root_path 5 | 6 | def index 7 | if admin_user_missing? 8 | redirect_to initial_setup_path 9 | end 10 | end 11 | 12 | def initial_setup; end 13 | end 14 | -------------------------------------------------------------------------------- /app/models/hiera_data/layer.rb: -------------------------------------------------------------------------------- 1 | class HieraData 2 | module Layer 3 | def self.for(environment:, key: nil) 4 | # rubocop:disable Rails/CompactBlank 5 | [Global.new, Environment.new(environment:), Module.new(environment:, key:)].select(&:present?) 6 | # rubocop:enable Rails/CompactBlank 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /bin/entry.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | HDM_PORT=$1 4 | HDM_HOST=$2 5 | 6 | bundle exec rake db:setup 7 | bundle exec rake hdm:assets 8 | 9 | if [[ "${DEVELOP}" -eq 1 ]]; then 10 | bundle exec rails db:seed 11 | ./bin/fake_puppet_db & 12 | fi 13 | # shellcheck disable=SC2086 14 | bundle exec rails server -b $HDM_HOST -p $HDM_PORT 15 | -------------------------------------------------------------------------------- /test/channels/application_cable/connection_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase 4 | # test "connects with cookies" do 5 | # cookies.signed[:user_id] = 42 6 | # 7 | # connect 8 | # 9 | # assert_equal connection.user_id, "42" 10 | # end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/trees/show.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= render "environments/select_environment" %> 4 |
5 |
6 |
7 |
8 | 9 |
10 |
11 | <%= render "files" %> 12 |
13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /db/migrate/20210901095628_create_groups.rb: -------------------------------------------------------------------------------- 1 | class CreateGroups < ActiveRecord::Migration[6.1] 2 | def change 3 | create_table :groups do |t| 4 | t.string :name, index: { unique: true } 5 | t.string :restrict, null: false, default: "environment" 6 | t.text :rules 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/hdm/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | a: value a 3 | mod_a::a: value mod_a::a (from environment) 4 | mod_a::hash_a: 5 | a: value mod_a::hash_a.a (from environment) 6 | mod_a::hash_b: 7 | a: value mod_a::hash_b.a (from environment) 8 | lookup_options: 9 | mod_a::hash_b: 10 | merge: hash 11 | testmod::integer: 6 12 | -------------------------------------------------------------------------------- /db/migrate/20210901100018_create_group_memberships.rb: -------------------------------------------------------------------------------- 1 | class CreateGroupMemberships < ActiveRecord::Migration[6.1] 2 | def change 3 | create_table :group_memberships do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.references :group, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /test/factories/groups.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :group do 3 | sequence(:name) { |n| "Group#{n}" } 4 | 5 | trait :environment do 6 | restrict { "environment" } 7 | end 8 | 9 | trait :node do 10 | restrict { "node" } 11 | end 12 | 13 | trait :key do 14 | restrict { "key" } 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /FOREMAN_SCREENSHOTS.md: -------------------------------------------------------------------------------- 1 | # Foreman Screenshots 2 | 3 | ## Foreman Smart Proxy 4 | 5 | ![](screenshots/foreman/Foreman-Smart-Proxy-1.png) 6 | ![](screenshots/foreman/Foreman-Smart-Proxy-2.png) 7 | 8 | ## Foreman Host 9 | 10 | ![](screenshots/foreman/Foreman-Host-1.png) 11 | ![](screenshots/foreman/Foreman-Host-2.png) 12 | ![](screenshots/foreman/Foreman-Host-3.png) 13 | -------------------------------------------------------------------------------- /test/factories/puppet_nodes.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :puppet_node do 3 | fqdn { "MyString" } 4 | role { "MyString" } 5 | puppet_environment { nil } 6 | zone { "MyString" } 7 | os_family { "MyString" } 8 | os_lsbdistcodename { "MyString" } 9 | organization { "MyString" } 10 | config_file_name { "MyString" } 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/globs/data/common/foobar.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | foobar::enable_firstrun: false 3 | foobar::firstrun::linux_classes: 4 | hostname: common::hostname 5 | foobar::time::servers: 6 | - pool.ntp.org 7 | foobar::timezone: UTC 8 | foobar::postfix::tp::resources_hash: 9 | tp::conf: 10 | postfix: 11 | template: foobar/postfix/main.cf.erb 12 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/lookup_tests/data/zone/test_zone.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm_unique_array: 3 | - zone 4 | hdm_duplicates_in_array: 5 | - node 6 | - zone 7 | hdm_nested_array: 8 | - duplicate 9 | hdm_simple_hash: 10 | added_by_zone: zone 11 | hdm_nested_hash: 12 | origin: zone 13 | nested_hash: 14 | integer: 44 15 | added_by_zone: zone 16 | -------------------------------------------------------------------------------- /app/controllers/environments_controller.rb: -------------------------------------------------------------------------------- 1 | class EnvironmentsController < ApplicationController 2 | add_breadcrumb "Home", :root_path 3 | add_breadcrumb "Environments", :environments_path 4 | 5 | def index 6 | authorize! :index, Environment 7 | @environments = Environment.all 8 | @environments.select! { |e| current_user.may_access?(e) } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/views/nodes/index.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= render "environments/select_environment" %> 4 |
5 |
6 | <%= render "nodes/select_node" %> 7 | <%= render "files/search" %> 8 | <%= link_to "Show tree", environment_tree_path(@environment), class: "btn btn-secondary mt-2" %> 9 |
10 |
11 | -------------------------------------------------------------------------------- /config/hdm.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=HDM 3 | Requires=network.target 4 | 5 | [Service] 6 | Type=simple 7 | EnvironmentFile=/etc/sysconfig/hdm 8 | WorkingDirectory=/opt/hdm 9 | ExecStart=/bin/bash -lc 'bundle exec rails server -e $ENVIRONMENT -b $BIND -p $PORT' 10 | TimeoutSec=30 11 | RestartSec=15s 12 | Restart=always 13 | 14 | [Install] 15 | WantedBy=multi-user.target 16 | -------------------------------------------------------------------------------- /db/migrate/20210129053631_create_puppet_values.rb: -------------------------------------------------------------------------------- 1 | class CreatePuppetValues < ActiveRecord::Migration[6.1] 2 | def change 3 | create_table :puppet_values do |t| 4 | t.string :value 5 | t.string :slug 6 | t.references :puppet_configuration, null: false, foreign_key: true 7 | 8 | t.timestamps 9 | end 10 | add_index :puppet_values, :slug 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20210203192655_create_puppet_options.rb: -------------------------------------------------------------------------------- 1 | class CreatePuppetOptions < ActiveRecord::Migration[6.1] 2 | def change 3 | create_table :puppet_options do |t| 4 | t.string :name 5 | t.string :slug 6 | t.references :puppet_node, null: false, foreign_key: true 7 | 8 | t.timestamps 9 | end 10 | 11 | add_index :puppet_options, :slug 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/eyaml/data/nodes/test.host.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | noop_mode: true 3 | foobar::enable_firstrun: true 4 | foobar::firstrun::linux_classes: 5 | hostname: hostname 6 | foobar::time::servers: 7 | - debian.pool.ntp.org 8 | foobar::timezone: CET 9 | foobar::postfix::tp::resources_hash: 10 | tp::conf: 11 | postfix: 12 | template: foobar/postfix/main.cf.epp 13 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/globs/data/nodes/testhost.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | noop_mode: true 3 | foobar::enable_firstrun: true 4 | foobar::firstrun::linux_classes: 5 | hostname: hostname 6 | foobar::time::servers: 7 | - debian.pool.ntp.org 8 | foobar::timezone: CET 9 | foobar::postfix::tp::resources_hash: 10 | tp::conf: 11 | postfix: 12 | template: foobar/postfix/main.cf.epp 13 | -------------------------------------------------------------------------------- /app/javascript/controllers/append_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from "@hotwired/stimulus" 2 | 3 | export default class extends Controller { 4 | static targets = ["container", "template"]; 5 | 6 | append(event) { 7 | event.preventDefault(); 8 | const template = this.templateTarget.innerHTML; 9 | this.containerTarget.insertAdjacentHTML('beforeend', template); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /db/seeds.rb: -------------------------------------------------------------------------------- 1 | # This file should contain all the record creation needed to seed the database with its default values. 2 | # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). 3 | # 4 | # Examples: 5 | # 6 | # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) 7 | # Character.create(name: 'Luke', movie: movies.first) 8 | -------------------------------------------------------------------------------- /test/factories/users.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :user do 3 | first_name { Faker::Name.first_name } 4 | last_name { Faker::Name.last_name } 5 | username { Faker::Internet.unique.email } 6 | password { "password" } 7 | 8 | trait :admin do 9 | role { "admin" } 10 | end 11 | 12 | trait :api do 13 | role { "api" } 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20231102112138_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb: -------------------------------------------------------------------------------- 1 | # This migration comes from active_storage (originally 20211119233751) 2 | class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] 3 | def change 4 | return unless table_exists?(:active_storage_blobs) 5 | 6 | change_column_null(:active_storage_blobs, :checksum, true) 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/test/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "Eyaml hierarchy" 8 | paths: 9 | - "nodes/%{::facts.fqdn}.yaml" 10 | - "role/%{::facts.role}-%{::facts.env}.yaml" 11 | - "role/%{::facts.role}.yaml" 12 | - "zone/%{::facts.zone}.yaml" 13 | - "common.yaml" 14 | -------------------------------------------------------------------------------- /app/controllers/trees_controller.rb: -------------------------------------------------------------------------------- 1 | class TreesController < ApplicationController 2 | before_action :ensure_rbac_disabled 3 | before_action :load_environments 4 | 5 | add_breadcrumb "Home", :root_path 6 | add_breadcrumb "Environments", :environments_path 7 | 8 | def show 9 | add_breadcrumb @environment, environment_nodes_path(@environment) 10 | add_breadcrumb "Tree" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/controllers/trees_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class TreesControllerTest < ActionDispatch::IntegrationTest 4 | test "cannot access when RBAC is in use" do 5 | Group.create!(name: "test", restrict: "environment", rules: [/x/]) 6 | sign_in_as(users(:user)) 7 | 8 | get environment_tree_path("development") 9 | 10 | assert_response(:forbidden) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "Eyaml hierarchy" 8 | paths: 9 | - "nodes/%{::facts.fqdn}.yaml" 10 | - "role/%{::facts.role}-%{::facts.env}.yaml" 11 | - "role/%{::facts.role}.yaml" 12 | - "zone/%{::facts.zone}.yaml" 13 | - "common.yaml" 14 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/multiple_hierarchies/data/nodes/test.host.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | noop_mode: true 3 | foobar::enable_firstrun: true 4 | foobar::firstrun::linux_classes: 5 | hostname: hostname 6 | foobar::time::servers: 7 | - debian.pool.ntp.org 8 | foobar::timezone: CET 9 | foobar::postfix::tp::resources_hash: 10 | tp::conf: 11 | postfix: 12 | template: foobar/postfix/main.cf.epp 13 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/eyaml/data/nodes/1jyln4zc.betadots.training.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | noop_mode: true 3 | foobar::enable_firstrun: true 4 | foobar::firstrun::linux_classes: 5 | hostname: hostname 6 | foobar::time::servers: 7 | - debian.pool.ntp.org 8 | foobar::timezone: CET 9 | foobar::postfix::tp::resources_hash: 10 | tp::conf: 11 | postfix: 12 | template: foobar/postfix/main.cf.epp 13 | -------------------------------------------------------------------------------- /app/models/saml.rb: -------------------------------------------------------------------------------- 1 | class Saml 2 | def self.configured? 3 | Rails.configuration.hdm[:saml].present? 4 | end 5 | 6 | def initialize 7 | @hdm_settings = Rails.configuration.hdm[:saml] 8 | @hdm_settings[:name_identifier_format] ||= "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" 9 | end 10 | 11 | def settings 12 | OneLogin::RubySaml::Settings.new(@hdm_settings) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/data/nodes/testhost.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | noop_mode: true 3 | classes: [] 4 | foobar::enable_firstrun: true 5 | foobar::firstrun::linux_classes: 6 | hostname: hostname 7 | foobar::time::servers: 8 | - debian.pool.ntp.org 9 | foobar::timezone: CET 10 | foobar::postfix::tp::resources_hash: 11 | tp::conf: 12 | postfix: 13 | template: foobar/postfix/main.cf.epp 14 | -------------------------------------------------------------------------------- /lib/templates/erb/scaffold/edit.html.erb.tt: -------------------------------------------------------------------------------- 1 |
2 |

Editing <%= singular_table_name.titleize %>

3 | <%%= render 'form', <%= singular_table_name %>: @<%= singular_table_name %> %> 4 |
5 | <%%= link_to 'Show', @<%= singular_table_name %>, class:"btn btn-light min-width-btn" %> 6 | <%%= link_to 'Back', <%= index_helper %>_path, class:"btn btn-light min-width-btn" %> 7 |
-------------------------------------------------------------------------------- /app/controllers/api/v1/nodes_controller.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | module V1 3 | class NodesController < Api::V1::ApiController 4 | def index 5 | @nodes = Node.all 6 | @nodes.select! { |n| current_user.may_access?(n) } 7 | 8 | respond_to do |format| 9 | format.json do 10 | render json: @nodes 11 | end 12 | end 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20210831124630_add_admin_flag_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddAdminFlagToUser < ActiveRecord::Migration[6.1] 2 | def change 3 | add_column :users, :admin, :boolean, null: false, default: false 4 | 5 | reversible do |dir| 6 | dir.up do 7 | execute "UPDATE users SET admin = EXISTS(SELECT id FROM roles WHERE users.role_id = roles.id AND roles.name = 'Admin')" 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /test/integration/api/v1/nodes_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | module Api 4 | module V1 5 | class NodesTest < ActionDispatch::IntegrationTest 6 | openapi! if respond_to?(:openapi!) 7 | 8 | test "GET /index returns a list of available nodes" do 9 | get "/api/v1/nodes", headers: basic_auth_header, as: :json 10 | assert_response :success 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/keys/_value.html.erb: -------------------------------------------------------------------------------- 1 | <% if file.has_differing_value_in_original_environment?(node: @node, key: @key) %> 2 | <%= render "shared/tabbed_diff", dom_id: dom_id(file), original_value: file.value_from_original_environment(node: @node, key: @key).value, current_value: value.value do %> 3 | <%= render "form", file: file, value: value %> 4 | <% end %> 5 | <% else %> 6 | <%= render "form", file: file, value: value %> 7 | <% end %> 8 | -------------------------------------------------------------------------------- /app/views/users/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

Editing User

3 | <%= render 'form', user: @user %> 4 |
5 | <%= link_to @user, class:"btn btn-light min-width-btn" do %> 6 | <%= icon "eye" %> 7 | Show 8 | <% end %> 9 | <%= link_to users_path, class:"btn btn-light min-width-btn" do %> 10 | <%= icon "arrow-left-short" %> 11 | Back 12 | <% end %> 13 |
14 | -------------------------------------------------------------------------------- /db/migrate/20201115095522_create_users.rb: -------------------------------------------------------------------------------- 1 | class CreateUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :users do |t| 4 | t.string :first_name 5 | t.string :last_name 6 | t.string :email 7 | t.string :password_digest 8 | t.belongs_to :role, null: false, foreign_key: true 9 | 10 | t.timestamps 11 | end 12 | add_index :users, :email, unique: true 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/development/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm::float: 0.1 3 | hdm::integer: 1 4 | foobar::enable_firstrun: false 5 | foobar::firstrun::linux_classes: 6 | hostname: common::hostname 7 | foobar::time::servers: 8 | - pool.ntp.org 9 | foobar::timezone: UTC 10 | foobar::postfix::tp::resources_hash: 11 | tp::conf: 12 | postfix: 13 | template: foobar/postfix/main.cf.erb 14 | testmod::integer: 7 15 | -------------------------------------------------------------------------------- /test/fixtures/users.yml: -------------------------------------------------------------------------------- 1 | admin: 2 | first_name: Admin 3 | last_name: Admin 4 | username: admin@example.com 5 | password_digest: "$2a$12$DqQSeLUn7H3hBgT2JXnwtOwKo2iWGUzS.YqUYoxZK70jvMHmpOOe2" # password 6 | role: admin 7 | user: 8 | first_name: Regular 9 | last_name: User 10 | username: user@example.com 11 | password_digest: "$2a$12$DqQSeLUn7H3hBgT2JXnwtOwKo2iWGUzS.YqUYoxZK70jvMHmpOOe2" # password 12 | role: regular 13 | -------------------------------------------------------------------------------- /app/views/groups/edit.html.erb: -------------------------------------------------------------------------------- 1 |
2 |

Editing Group

3 | <%= render 'form', group: @group %> 4 |
5 | <%= link_to @group, class:"btn btn-light min-width-btn" do %> 6 | <%= icon "eye" %> 7 | Show 8 | <% end %> 9 | <%= link_to groups_path, class:"btn btn-light min-width-btn" do %> 10 | <%= icon "arrow-left-short" %> 11 | Back 12 | <% end %> 13 |
14 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/globs/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "Eyaml hierarchy" 8 | paths: 9 | - "nodes/%{::facts.fqdn}.yaml" 10 | - "role/%{::facts.role}-%{::facts.env}.yaml" 11 | - "role/%{::facts.role}.yaml" 12 | - "zone/%{::facts.zone}.yaml" 13 | - name: "Common" 14 | globs: 15 | - "common/*.yaml" 16 | -------------------------------------------------------------------------------- /app/views/users/new.html.erb: -------------------------------------------------------------------------------- 1 |
2 | <% if User.none? %> 3 |

Create the initial admin account

4 | <% else %> 5 |

New User

6 | <% end %> 7 | <%= render 'form', user: @user %> 8 |
9 | <% if User.any? %> 10 | <%= link_to users_path, class:"btn btn-light min-width-btn" do %> 11 | <%= icon "arrow-left-short" %> 12 | Back 13 | <% end %> 14 | <% end %> 15 |
16 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/lookup_tests/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "Host specific" 8 | path: "nodes/%{::facts.fqdn}.yaml" 9 | 10 | - name: "Role / zone specific" # Uses custom facts. 11 | paths: 12 | - "role/%{::facts.role}.yaml" 13 | - "zone/%{::facts.zone}.yaml" 14 | 15 | - name: "Global data" 16 | path: "common.yaml" 17 | -------------------------------------------------------------------------------- /test/integration/api/v1/environments_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | module Api 4 | module V1 5 | class EnvironmentsTest < ActionDispatch::IntegrationTest 6 | openapi! if respond_to?(:openapi!) 7 | 8 | test "GET /index returns a list of available environments" do 9 | get "/api/v1/environments", headers: basic_auth_header, as: :json 10 | assert_response :success 11 | end 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /config/initializers/eyaml.rb: -------------------------------------------------------------------------------- 1 | require 'hiera/backend/eyaml' 2 | require 'hiera/backend/eyaml/logginghelper' 3 | require 'hiera/backend/eyaml/utils' 4 | require 'hiera/backend/eyaml/options' 5 | require 'hiera/backend/eyaml/parser/parser' 6 | require 'hiera/backend/eyaml/plugins' 7 | require 'hiera/backend/eyaml/encryptors/pkcs7' 8 | 9 | # Register all plugins 10 | Hiera::Backend::Eyaml::Encryptors::Pkcs7.register 11 | Hiera::Backend::Eyaml::Plugins.find 12 | -------------------------------------------------------------------------------- /app/controllers/nodes_controller.rb: -------------------------------------------------------------------------------- 1 | class NodesController < ApplicationController 2 | before_action :load_environments 3 | 4 | add_breadcrumb "Home", :root_path 5 | add_breadcrumb "Environments", :environments_path 6 | 7 | def index 8 | authorize! :index, Node 9 | @nodes = Node.all 10 | @nodes.select! { |n| current_user.may_access?(n) } 11 | 12 | add_breadcrumb @environment, environment_nodes_path(@environment) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/shared/_diff.html.erb: -------------------------------------------------------------------------------- 1 | <% split_diff = Diffy::SplitDiff.new(original_value, current_value, format: :html) %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
<%= @node.environment.name %><%= @environment.name %>
<%= raw(split_diff.left) %><%= raw(split_diff.right) %>
16 | -------------------------------------------------------------------------------- /test/models/layer_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class LayerTest < ActiveSupport::TestCase 4 | test "#hierarchies loads all hierarchies" do 5 | environment = Environment.new(name: "development") 6 | layer = environment.environment_layer 7 | hierarchies = [Hierarchy.new(layer:, name: "test", backend: :yaml)] 8 | Hierarchy.stub(:all, hierarchies) do 9 | assert_equal hierarchies, layer.hierarchies 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/controllers/api/v1/environments_controller.rb: -------------------------------------------------------------------------------- 1 | module Api 2 | module V1 3 | class EnvironmentsController < Api::V1::ApiController 4 | def index 5 | @environments = Environment.all 6 | @environments.select! { |e| current_user.may_access?(e) } 7 | 8 | respond_to do |format| 9 | format.json do 10 | render json: @environments 11 | end 12 | end 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/controllers/encrypted_values_controller.rb: -------------------------------------------------------------------------------- 1 | class EncryptedValuesController < ApplicationController 2 | before_action :load_environments 3 | 4 | def create 5 | authorize! :encrypt, Value 6 | layer = @environment.find_layer(name: params[:layer_id]) 7 | hierarchy = Hierarchy.find(layer: layer, name: params[:hierarchy_id]) 8 | @encrypted_value = hierarchy.encrypt_value(params[:value]) 9 | 10 | render plain: @encrypted_value 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🚀 Release 3 | 4 | on: 5 | push: 6 | tags: 7 | - '*' 8 | 9 | jobs: 10 | release: 11 | name: Release 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v6 15 | with: 16 | fetch-depth: 0 17 | 18 | - name: Create Release 19 | env: 20 | GH_TOKEN: ${{ github.token }} 21 | run: gh release create ${{ github.ref_name }} --generate-notes 22 | -------------------------------------------------------------------------------- /app/controllers/decrypted_values_controller.rb: -------------------------------------------------------------------------------- 1 | class DecryptedValuesController < ApplicationController 2 | before_action :load_environments 3 | 4 | def create 5 | authorize! :decrypt, Value 6 | layer = @environment.find_layer(name: params[:layer_id]) 7 | hierarchy = Hierarchy.find(layer: layer, name: params[:hierarchy_id]) 8 | @decrypted_value = hierarchy.decrypt_value(params[:value].chomp) 9 | 10 | render plain: @decrypted_value 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/lookup_tests/data/role/test_role.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm_integer: 42 3 | hdm_string: "role" 4 | hdm_unique_array: 5 | - role 6 | hdm_duplicates_in_array: 7 | - node 8 | - role 9 | hdm_nested_array: 10 | - from_role 11 | - nested_hash: 12 | role_integer: 2 13 | hdm_simple_hash: 14 | origin: role 15 | added_by_role: role 16 | hdm_nested_hash: 17 | nested_hash: 18 | added_by_role: role 19 | hdm_integer_with_duplicates: 99 20 | -------------------------------------------------------------------------------- /vagrant/hdm/feat_23498/manifests/site.pp: -------------------------------------------------------------------------------- 1 | File { 2 | backup => false, 3 | } 4 | $classes_hash = lookup('classes', { 'value_type' => Hash, 'default_value' => {} }) 5 | $classes_hash.keys.sort.each |$key| { 6 | if $classes_hash[$key] != '' { 7 | contain $classes_hash[$key] 8 | } else { 9 | echo { $key: 10 | message => "Class for ${key} on ${facts['networking']['fqdn']} is disabled", 11 | withpath => false, 12 | } 13 | } 14 | } 15 | node default {} 16 | -------------------------------------------------------------------------------- /vagrant/hdm/production/manifests/site.pp: -------------------------------------------------------------------------------- 1 | File { 2 | backup => false, 3 | } 4 | $classes_hash = lookup('classes', { 'value_type' => Hash, 'default_value' => {} }) 5 | $classes_hash.keys.sort.each |$key| { 6 | if $classes_hash[$key] != '' { 7 | contain $classes_hash[$key] 8 | } else { 9 | echo { $key: 10 | message => "Class for ${key} on ${facts['networking']['fqdn']} is disabled", 11 | withpath => false, 12 | } 13 | } 14 | } 15 | node default {} 16 | -------------------------------------------------------------------------------- /app/controllers/concerns/environment_and_node_concern.rb: -------------------------------------------------------------------------------- 1 | module EnvironmentAndNodeConcern 2 | extend ActiveSupport::Concern 3 | 4 | included do 5 | before_action :load_environment 6 | before_action :load_node 7 | end 8 | 9 | private 10 | 11 | def load_environment 12 | @environment = Environment.find(params[:environment_id]) 13 | end 14 | 15 | def load_node 16 | @node = Node.new(hostname: params[:node_id], environment: @environment) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/models/hiera_data/layer/global.rb: -------------------------------------------------------------------------------- 1 | class HieraData 2 | module Layer 3 | class Global < Base 4 | def base_path 5 | hiera_yaml.dirname 6 | end 7 | 8 | def name = "global" 9 | 10 | def description = nil 11 | 12 | private 13 | 14 | def hiera_yaml 15 | Pathname.new( 16 | Rails.configuration.hdm.global_hiera_yaml || "/etc/puppetlabs/puppet/hiera.yaml" 17 | ) 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /vagrant/hdm/feat_23498/data/nodes/openvox.hdm.workshop.betadots.training.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | classes: 3 | '90_hdm_class': 'hdm' 4 | '91_puppetdb_class': 'puppetdb' 5 | '92_puppetdb_master_class': 'puppetdb::master::config' 6 | '89_time': 'chrony' 7 | 8 | hdm::version: 'v3.1.0' 9 | hdm::disable_authentication: true 10 | postgresql::globals::manage_dnf_module: false 11 | puppetdb::manage_firewall: false 12 | puppetdb::postgres_version: '13' 13 | puppetdb::manage_package_repo: false 14 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/eyaml/generate_eyaml_entries.rb: -------------------------------------------------------------------------------- 1 | #!/bin/ruby 2 | 3 | if ARGV.length < 1 4 | puts "please provide the number of nodes to create" 5 | exit 6 | end 7 | 8 | i = 0 9 | while i < ARGV[0].to_i 10 | string_length = 8 11 | entry = rand(36**string_length).to_s(36) 12 | crypt = %x(bundle exec eyaml encrypt -o block -s #{entry}) 13 | File.open('data/common.yaml', 'a') { |f| 14 | f.write "#{entry}: >\n#{crypt}\n\n" 15 | } 16 | i += 1 17 | end 18 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/multiple_hierarchies/hiera_hdm.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "Host specific" 8 | path: "nodes/%{::fqdn}.yaml" 9 | 10 | - name: "Per-datacenter business group data" # Uses custom facts. 11 | paths: 12 | - "role/%{::role}.yaml" 13 | - "zone/%{::zone}.yaml" 14 | 15 | - name: "Global data" 16 | paths: 17 | - "usermanagement.yaml" 18 | 19 | -------------------------------------------------------------------------------- /app/models/dummy_user.rb: -------------------------------------------------------------------------------- 1 | class DummyUser 2 | def initialize 3 | raise "cannot be used unless authentication is disabled" unless Rails.configuration.hdm.authentication_disabled 4 | end 5 | 6 | def id 7 | nil 8 | end 9 | 10 | def username 11 | "anonymous" 12 | end 13 | 14 | def admin? 15 | false 16 | end 17 | 18 | def user? 19 | true 20 | end 21 | 22 | def api? 23 | true 24 | end 25 | 26 | def may_access?(_record) 27 | true 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /app/models/value.rb: -------------------------------------------------------------------------------- 1 | class Value < HieraModel 2 | attribute :data_file 3 | attribute :key 4 | attribute :value, :string 5 | 6 | delegate :hiera_file, to: :data_file 7 | 8 | def encrypted? 9 | HieraData::EYamlFile.encrypted?(value) 10 | end 11 | 12 | def update(new_value) 13 | parsed_value = YAML.safe_load(new_value) 14 | hiera_file.write_key(key.name, parsed_value) 15 | end 16 | 17 | def destroy 18 | hiera_file.remove_key(data_file.path, key.name) 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /config/importmap.rb: -------------------------------------------------------------------------------- 1 | # Pin npm packages by running ./bin/importmap 2 | 3 | pin "application", preload: true 4 | pin "@hotwired/turbo-rails", to: "turbo.min.js", preload: true 5 | pin "@hotwired/stimulus", to: "stimulus.min.js", preload: true 6 | pin "@hotwired/stimulus-loading", to: "stimulus-loading.js", preload: true 7 | pin "@popperjs/core", to: "popper.js", preload: true 8 | pin "bootstrap", to: "bootstrap.js" 9 | pin_all_from "app/javascript/controllers", under: "controllers" 10 | pin "slim-select" 11 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/lookup_tests/data/nodes/lookup.betadots.training.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm_integer: 23 3 | hdm_unique_array: 4 | - node 5 | hdm_duplicates_in_array: 6 | - node 7 | hdm_nested_array: 8 | - duplicate 9 | - nested_hash: 10 | node_integer: 2 11 | hdm_simple_hash: 12 | origin: node 13 | hdm_nested_hash: 14 | origin: node 15 | nested_hash: 16 | integer: 5 17 | hdm_mixed_types: 18 | from_node: 23 19 | hdm_mixed_types2: 23 20 | hdm_integer_with_duplicates: 99 21 | -------------------------------------------------------------------------------- /db/migrate/20201115120803_create_puppet_nodes.rb: -------------------------------------------------------------------------------- 1 | class CreatePuppetNodes < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :puppet_nodes do |t| 4 | t.string :fqdn 5 | t.string :role 6 | t.belongs_to :puppet_environment, null: false, foreign_key: true 7 | t.string :zone 8 | t.string :os_family 9 | t.string :os_lsbdistcodename 10 | t.string :organization 11 | t.string :config_file_name 12 | 13 | t.timestamps 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /test/controllers/environments_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class EnvironmentsControllerTest < ActionDispatch::IntegrationTest 4 | test "an admin cannot access the index page" do 5 | sign_in_as(users(:admin)) 6 | 7 | get environments_path 8 | 9 | assert_response(:forbidden) 10 | end 11 | 12 | test "a regular user can access the index page" do 13 | sign_in_as(users(:user)) 14 | 15 | get environments_path 16 | 17 | assert_response(:success) 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /test/controllers/sessions_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class SessionsControllerTest < ActionDispatch::IntegrationTest 4 | # test "should get new" do 5 | # get sessions_new_url 6 | # assert_response :success 7 | # end 8 | 9 | # test "should get create" do 10 | # get sessions_create_url 11 | # assert_response :success 12 | # end 13 | 14 | # test "should get destroy" do 15 | # get sessions_destroy_url 16 | # assert_response :success 17 | # end 18 | 19 | end 20 | -------------------------------------------------------------------------------- /app/models/hiera_data/layer/environment.rb: -------------------------------------------------------------------------------- 1 | class HieraData 2 | module Layer 3 | class Environment < Base 4 | def initialize(environment:) 5 | super() 6 | @environment = HieraData::Environment.new(name: environment) 7 | end 8 | 9 | # rubocop:disable Rails/Delegate 10 | def base_path = @environment.base_path 11 | # rubocop:enable Rails/Delegate 12 | 13 | def name = "environment" 14 | 15 | def description = @environment.name 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. 4 | # Use this to limit dissemination of sensitive information. 5 | # See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. 6 | Rails.application.config.filter_parameters += [ 7 | :passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn, :cvv, :cvc 8 | ] 9 | -------------------------------------------------------------------------------- /test/models/hiera_data/util_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class HieraData 4 | class UtilTest < ActiveSupport::TestCase 5 | test "::yaml_format converts a hash to yaml and removes leading `---`" do 6 | hash = { "test" => 23 } 7 | 8 | assert_equal "test: 23", Util.yaml_format(hash) 9 | end 10 | 11 | test "::yaml_format converts an integer to yaml and removes leading `---`" do 12 | integer = 23 13 | 14 | assert_equal "23", Util.yaml_format(integer) 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/multiple_hierarchies/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | data_hash: yaml_data 5 | 6 | hierarchy: 7 | - name: "Host specific" 8 | path: "nodes/%{::facts.fqdn}.yaml" 9 | 10 | - name: "Per-datacenter business group data" # Uses custom facts. 11 | paths: 12 | - "role/%{::facts.role}-%{::facts.env}.yaml" 13 | - "role/%{::facts.role}.yaml" 14 | - "zone/%{::facts.zone}.yaml" 15 | 16 | - name: "Global data" 17 | path: "common.yaml" 18 | 19 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/generate_nodes.rb: -------------------------------------------------------------------------------- 1 | #!/bin/ruby 2 | 3 | if ARGV.length < 2 4 | puts "please provide the number of nodes to create and the name of the target environment" 5 | exit 6 | end 7 | 8 | ARGV[0].to_i.times do |_i| 9 | string_length = 8 10 | hostname = rand(36**string_length).to_s(36) 11 | File.open("nodes/#{hostname}.betadots.training_facts.yaml", "wx") do |f| 12 | f.write "---\nfqdn: '#{hostname}.betadots.training'\nrole: 'hdm_test'\nenvironment: '#{ARGV[1]}'\nzone: 'internal'\n" 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /test/support/sign_in_helper.rb: -------------------------------------------------------------------------------- 1 | module SignInHelper 2 | def sign_in_as(user, password: "password") 3 | post sessions_path(username: user.username, password:) 4 | follow_redirect! 5 | end 6 | 7 | def basic_auth_header(user: nil) 8 | password = "apiuser23" 9 | user ||= FactoryBot.create(:user, :api, password:) 10 | authorization = ActionController::HttpAuthentication::Basic 11 | .encode_credentials(user.username, password) 12 | { 'HTTP_AUTHORIZATION' => authorization } 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/lookups/show.html.erb: -------------------------------------------------------------------------------- 1 | <%= turbo_frame_tag "lookup-result-frame" do %> 2 | <% if @original_result && @original_result != @result %> 3 | <%= render "shared/tabbed_diff", dom_id: "lookup-#{dom_id(@key)}", original_value: @original_result, current_value: @result do %> 4 |
5 |
<%= HieraData::Util.yaml_format(@result) %>
6 |
7 | <% end %> 8 | <% else %> 9 |
<%= HieraData::Util.yaml_format(@result) %>
10 | <% end %> 11 | <% end %> 12 | -------------------------------------------------------------------------------- /test/controllers/tree_files_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class TreeFilesControllerTest < ActionDispatch::IntegrationTest 4 | test "cannot access when RBAC is in use" do 5 | Group.create!(name: "test", restrict: "environment", rules: [/x/]) 6 | sign_in_as(users(:user)) 7 | 8 | get environment_tree_layer_hierarchy_path_tree_file_path( 9 | "development", 10 | "environment", 11 | "Eyaml hierarchy", 12 | "common.yaml" 13 | ) 14 | 15 | assert_response(:forbidden) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /test/models/hiera_data/git_repo_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class HieraData 4 | class GitRepoTest < ActiveSupport::TestCase 5 | test "#initialize raises when given invalid git uri" do 6 | assert_raises(Hdm::Error) do 7 | HieraData::GitRepo.new("git@://invalid_uri") 8 | end 9 | end 10 | 11 | test "#intialize raises when given a non-existant repo" do 12 | assert_raises(Hdm::Error) do 13 | HieraData::GitRepo.new("git@example.invalid:repost/test.git") 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/views/groups/_rule.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= text_field_tag "group[rules][]", rule, class:"form-control", readonly: local_assigns[:read_only] %> 4 |
5 |
6 |
7 |
8 | <% unless local_assigns[:read_only] %> 9 | <%= button_tag type: "button", class: "btn btn-danger", data: {action: "remove#remove"} do %> 10 | <%= icon "dash-circle" %> Remove Rule 11 | <% end %> 12 | <% end %> 13 |
14 |
15 | -------------------------------------------------------------------------------- /app/javascript/controllers/text_input_navigation_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from "@hotwired/stimulus" 2 | import { Turbo } from "@hotwired/turbo-rails" 3 | 4 | // Connects to data-controller="text-input-navigation" 5 | export default class extends Controller { 6 | static targets = ["input"] 7 | static values = {placeholder: String, url: String} 8 | 9 | navigate() { 10 | const trimmedValue = this.inputTarget.value.trim() 11 | const url = this.urlValue.replace(this.placeholderValue, trimmedValue); 12 | Turbo.visit(url); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /config/initializers/permissions_policy.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Define an application-wide HTTP permissions policy. For further 4 | # information see: https://developers.google.com/web/updates/2018/06/feature-policy 5 | 6 | # Rails.application.config.permissions_policy do |policy| 7 | # policy.camera :none 8 | # policy.gyroscope :none 9 | # policy.microphone :none 10 | # policy.usb :none 11 | # policy.fullscreen :self 12 | # policy.payment :self, "https://secure.example.com" 13 | # end 14 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/README.md: -------------------------------------------------------------------------------- 1 | Development and Test Data 2 | 3 | This data structure is used by the fake\_puppetdb service. 4 | 5 | 1. Environments 6 | 7 | Puppet environments are located in test/fixtures/files/puppet/environments 8 | 9 | Within an environment a hiery.yaml file may exist. 10 | Data are within the configured datadir. 11 | 12 | 2. Nodes 13 | 14 | Nodes are read from test/fixtures/files/puppet/nodes directory. 15 | For each node a yaml file exists. The file name is the node name. 16 | Within the yaml file, the required facts are set. 17 | 18 | -------------------------------------------------------------------------------- /test/models/hiera_data/layer/global_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class HieraData 4 | module Layer 5 | class GlobalTest < ActiveSupport::TestCase 6 | setup do 7 | @global_layer = HieraData::Layer::Global.new 8 | end 9 | 10 | test "#name is `global`" do 11 | assert_equal "global", @global_layer.name 12 | end 13 | 14 | test "#base_path returns directory of global `hiera.yaml`" do 15 | assert_equal "/etc/puppetlabs/puppet", @global_layer.base_path.to_s 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /config/initializers/wrap_parameters.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # This file contains settings for ActionController::ParamsWrapper which 4 | # is enabled by default. 5 | 6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. 7 | ActiveSupport.on_load(:action_controller) do 8 | wrap_parameters format: [:json] 9 | end 10 | 11 | # To enable root element in JSON for ActiveRecord objects. 12 | # ActiveSupport.on_load(:active_record) do 13 | # self.include_root_in_json = true 14 | # end 15 | -------------------------------------------------------------------------------- /app/javascript/controllers/select_navigation_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from "@hotwired/stimulus" 2 | import { Turbo } from "@hotwired/turbo-rails" 3 | 4 | export default class extends Controller { 5 | connect() { 6 | const selectedOption = this.element.options[this.element.selectedIndex] 7 | this.initialUrl = selectedOption.dataset.url 8 | } 9 | 10 | navigate() { 11 | const selectedOption = this.element.options[this.element.selectedIndex] 12 | const newUrl = selectedOption.dataset.url 13 | if (newUrl != this.initialUrl) Turbo.visit(newUrl) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/views/tree_files/show.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <%= render "environments/select_environment" %> 4 |
5 |
6 |
7 |
8 | 9 |
10 |
11 | <%= render "trees/files" %> 12 |
13 |
14 |
15 |
File content
16 |
17 |
<%= @data_file.hiera_file.raw_content %>
18 |
19 |
20 |
21 |
22 | -------------------------------------------------------------------------------- /test/application_system_test_case.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase 4 | driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400] 5 | 6 | private 7 | 8 | def slim_select(value, from:) 9 | select = find("select[name=\"#{from}\"]", visible: false) 10 | slim_select_main = select.sibling("div[class=ss-main]") 11 | slim_select_main.click 12 | option = find("div[class=ss-option]", text: value) 13 | option.click 14 | page.has_css?("div[class=ss-single]", text: value) 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 4 | # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } 5 | 6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code 7 | # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". 8 | Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] 9 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | PRs are very welcome! 4 | 5 | ## Adding code 6 | 7 | - Create a fork 8 | - Create a branch 9 | - Do your thing 10 | - [Please sign all your commits](https://docs.github.com/de/authentication/managing-commit-signature-verification) 11 | - Create a PR 12 | - Reference issues if applicable 13 | 14 | ## Found a bug? 15 | 16 | - Please open an [issue](https://github.com/betadots/hdm/issues) 17 | - If you are able to fix it, you also can open a PR (see above) 18 | 19 | ## Have an idea? 20 | 21 | - Please start a [discussion](https://github.com/betadots/hdm/discussions) 22 | -------------------------------------------------------------------------------- /db/migrate/20210128201737_create_puppet_configurations.rb: -------------------------------------------------------------------------------- 1 | class CreatePuppetConfigurations < ActiveRecord::Migration[6.1] 2 | def change 3 | create_table :puppet_configurations do |t| 4 | t.string :name 5 | t.string :slug 6 | t.integer :puppet_node_id 7 | t.integer :parent_id 8 | t.string :kind 9 | t.boolean :multiple_values, default: false, null: false 10 | 11 | t.timestamps 12 | end 13 | 14 | add_index :puppet_configurations, :slug 15 | add_index :puppet_configurations, :puppet_node_id 16 | add_index :puppet_configurations, :parent_id 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/views/files/_search.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag "", data: {controller: "text-input-navigation", action: "submit->text-input-navigation#navigate", text_input_navigation_placeholder_value: "KEY_ID", text_input_navigation_url_value: environment_key_files_path(key_id: "KEY_ID")} do |form| %> 2 |
3 | <%= label_tag :key, "Search for a key" %> 4 |
5 | <%= text_field_tag "key", @key&.name, class: "form-control", required: true, data: {text_input_navigation_target: "input"} %> 6 | 7 |
8 | <% end %> 9 | -------------------------------------------------------------------------------- /test/controllers/nodes_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class NodesControllerTest < ActionDispatch::IntegrationTest 4 | setup do 5 | @environment = Environment.new(name: "development") 6 | end 7 | 8 | test "an admin cannot access the index page" do 9 | sign_in_as(users(:admin)) 10 | 11 | get environment_nodes_path(@environment) 12 | 13 | assert_response(:forbidden) 14 | end 15 | 16 | test "a regular user can access the index page" do 17 | sign_in_as(users(:user)) 18 | 19 | get environment_nodes_path(@environment) 20 | 21 | assert_response(:success) 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /vagrant/hdm/production/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 5 3 | defaults: 4 | datadir: data 5 | lookup_key: eyaml_lookup_key 6 | # data_hash: yaml_data 7 | options: 8 | pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem 9 | pkcs7_public_key: /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem 10 | hierarchy: 11 | - name: "Per Node" 12 | path: "nodes/%{trusted.certname}.yaml" 13 | - name: "Stage and Location Data" 14 | paths: 15 | - "stage/%{facts.custom_fact.stage}.yaml" 16 | - "location/%{facts.custom_fact.location}.yaml" 17 | - name: "Default values" 18 | path: common.yaml 19 | 20 | -------------------------------------------------------------------------------- /vagrant/hdm/feat_23498/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 5 3 | defaults: 4 | datadir: data 5 | lookup_key: eyaml_lookup_key 6 | # data_hash: yaml_data 7 | options: 8 | pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem 9 | pkcs7_public_key: /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem 10 | 11 | hierarchy: 12 | - name: "Per Node" 13 | path: "nodes/%{trusted.certname}.yaml" 14 | - name: "Stage and Location Data" 15 | paths: 16 | - "stage/%{facts.custom_fact.stage}.yaml" 17 | - "location/%{facts.custom_fact.location}.yaml" 18 | - name: "Default values" 19 | path: common.yaml 20 | 21 | -------------------------------------------------------------------------------- /config/initializers/assets.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Version of your assets, change this if you want to expire all your assets. 4 | Rails.application.config.assets.version = "1.0" 5 | 6 | # Add additional assets to the asset load path. 7 | # Rails.application.config.assets.paths << Emoji.images_path 8 | 9 | # Precompile additional assets. 10 | # application.js, application.css, and all non-JS/CSS in the app/assets 11 | # folder are already added. 12 | # Rails.application.config.assets.precompile += %w[ admin.js admin.css ] 13 | Rails.application.config.assets.precompile += %w[popper.js bootstrap.js] 14 | -------------------------------------------------------------------------------- /app/javascript/controllers/index.js: -------------------------------------------------------------------------------- 1 | // Import and register all your controllers from the importmap under controllers/* 2 | 3 | import { application } from "controllers/application" 4 | 5 | // Eager load all controllers defined in the import map under controllers/**/*_controller 6 | import { eagerLoadControllersFrom } from "@hotwired/stimulus-loading" 7 | eagerLoadControllersFrom("controllers", application) 8 | 9 | // Lazy load controllers as they appear in the DOM (remember not to preload controllers in import map!) 10 | // import { lazyLoadControllersFrom } from "@hotwired/stimulus-loading" 11 | // lazyLoadControllersFrom("controllers", application) 12 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/eyaml/hiera.yaml: -------------------------------------------------------------------------------- 1 | version: 5 2 | defaults: 3 | datadir: data 4 | lookup_key: eyaml_lookup_key 5 | options: 6 | pkcs7_private_key: keys/private_key.pkcs7.pem 7 | pkcs7_public_key: keys/public_key.pkcs7.pem 8 | 9 | hierarchy: 10 | - name: "Host specific" 11 | path: "nodes/%{::facts.fqdn}.yaml" 12 | 13 | - name: "Per-datacenter business group data" # Uses custom facts. 14 | paths: 15 | - "role/%{::facts.role}-%{::facts.env}.yaml" 16 | - "role/%{::facts.role}.yaml" 17 | - "zone/%{::facts.zone}.yaml" 18 | 19 | - name: "Global data" 20 | path: "common.yaml" 21 | 22 | -------------------------------------------------------------------------------- /test/models/user_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class UserTest < ActiveSupport::TestCase 4 | test "#authenticate will not authenticate user without password" do 5 | user = FactoryBot.create(:user, password: nil, password_digest: nil) 6 | refute user.authenticate("password") 7 | end 8 | 9 | test "#authenticate will authenticate user with correct password" do 10 | user = FactoryBot.create(:user) 11 | assert user.authenticate("password") 12 | end 13 | 14 | test "#authenticate will not authenticate when given wrong password" do 15 | user = FactoryBot.create(:user) 16 | refute user.authenticate("wrong-password") 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/views/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 |

Login

2 | 3 | <%= render "shared/auth_navigation", active: :local %> 4 | 5 | <%= form_tag sessions_path do |form| %> 6 |
7 | <%= label_tag :username %> 8 | <%= text_field_tag :username, nil, class:"form-control", autofocus: true %> 9 |
10 |
11 | <%= label_tag :password %> 12 | <%= password_field_tag :password, nil, class:"form-control" %> 13 |
14 |
15 | <%= button_tag class: "btn btn-primary min-width-btn" do %> 16 | <%= icon("box-arrow-in-right") %> 17 | Login 18 | <% end %> 19 |
20 | <% end %> 21 | 22 | -------------------------------------------------------------------------------- /test/controllers/encrypted_values_controller_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class EncryptedValuesControllerTest < ActionDispatch::IntegrationTest 4 | setup do 5 | @allow_encryption = Rails.configuration.hdm["allow_encryption"] 6 | Rails.configuration.hdm["allow_encryption"] = true 7 | 8 | sign_in_as(users(:user)) 9 | end 10 | 11 | teardown do 12 | Rails.configuration.hdm["allow_encryption"] = @allow_encryption 13 | end 14 | 15 | test "POST :create" do 16 | post environment_layer_hierarchy_encrypted_values_path("eyaml", "environment", "Global data"), params: { value: "test" } 17 | 18 | assert_response :success 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /app/views/ldap_sessions/new.html.erb: -------------------------------------------------------------------------------- 1 |

Login

2 | 3 | <%= render "shared/auth_navigation", active: :ldap %> 4 | 5 | <%= form_tag ldap_session_path do |form| %> 6 |
7 | <%= label_tag :username %> 8 | <%= text_field_tag :username, nil, class:"form-control", autofocus: true %> 9 |
10 |
11 | <%= label_tag :password %> 12 | <%= password_field_tag :password, nil, class:"form-control" %> 13 |
14 |
15 | <%= button_tag class: "btn btn-primary min-width-btn" do %> 16 | <%= icon("box-arrow-in-right") %> 17 | Login 18 | <% end %> 19 |
20 | <% end %> 21 | 22 | -------------------------------------------------------------------------------- /vagrant/hdm/feat_23498/Puppetfile: -------------------------------------------------------------------------------- 1 | # mod 'golja-gnupg', '1.2.3' 2 | mod 'gnupg', :git => 'https://github.com/flepoutre/golja-gnupg.git', :branch => 'master' 3 | mod 'ipcrm-echo', '0.1.8' 4 | mod 'puppet-hdm', :git => 'https://github.com/voxpupuli/puppet-hdm.git', :branch => 'master' 5 | mod 'puppet-rvm', '3.0.0' 6 | mod 'puppet-systemd', '8.1.0' 7 | mod 'puppetlabs-apt', '10.0.1' 8 | mod 'puppetlabs-concat', '9.1.0' 9 | mod 'puppetlabs-docker', '10.1.0' 10 | mod 'puppetlabs-firewall', '8.1.4' 11 | mod 'puppetlabs-inifile', '6.2.0' 12 | mod 'puppetlabs-postgresql', '10.5.0' 13 | mod 'puppetlabs-puppetdb', '8.1.0' 14 | mod 'puppetlabs-stdlib', '9.7.0' 15 | mod 'puppetlabs-vcsrepo' 16 | -------------------------------------------------------------------------------- /db/migrate/20210201194246_add_configurable_to_configurations.rb: -------------------------------------------------------------------------------- 1 | class AddConfigurableToConfigurations < ActiveRecord::Migration[6.1] 2 | def change 3 | remove_index :puppet_configurations, :slug 4 | remove_column :puppet_configurations, :slug, :string 5 | 6 | remove_index :puppet_configurations, :puppet_node_id 7 | remove_column :puppet_configurations, :puppet_node_id, :integer 8 | 9 | add_column :puppet_configurations, :configurable_type, :string 10 | add_column :puppet_configurations, :configurable_id, :integer 11 | 12 | add_index :puppet_configurations, [:configurable_id, :configurable_type], name: 'index_puppet_configurations_on_configurable' 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/tree_files_controller.rb: -------------------------------------------------------------------------------- 1 | class TreeFilesController < ApplicationController 2 | before_action :ensure_rbac_disabled 3 | before_action :load_environments 4 | 5 | add_breadcrumb "Home", :root_path 6 | add_breadcrumb "Environments", :environments_path 7 | 8 | def show 9 | add_breadcrumb @environment, environment_nodes_path(@environment) 10 | add_breadcrumb "Tree", environment_tree_path(@environment) 11 | add_breadcrumb params[:path_id] 12 | 13 | @layer = @environment.find_layer(name: params[:layer_id]) 14 | @hierarchy = Hierarchy.find(layer: @layer, name: params[:hierarchy_id]) 15 | @data_file = @hierarchy.file(path: params[:path_id]) 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/controllers/files_controller.rb: -------------------------------------------------------------------------------- 1 | class FilesController < ApplicationController 2 | before_action :load_environments 3 | before_action :load_key 4 | 5 | add_breadcrumb "Home", :root_path 6 | add_breadcrumb "Environments", :environments_path 7 | 8 | def index 9 | @files_and_values = 10 | if can? :show, @key 11 | @key.search(environment: @environment) 12 | else 13 | {} 14 | end 15 | 16 | add_breadcrumb @environment, environment_nodes_path(@environment) 17 | add_breadcrumb @key, environment_key_files_path(@environment, @key) 18 | end 19 | 20 | private 21 | 22 | def load_key 23 | @key = Key.new(name: params[:key_id].squish) 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /vagrant/hdm/production/Puppetfile: -------------------------------------------------------------------------------- 1 | # mod 'golja-gnupg', '1.2.3' 2 | mod 'gnupg', :git => 'https://github.com/flepoutre/golja-gnupg.git', :branch => 'master' 3 | mod 'ipcrm-echo', '0.1.8' 4 | mod 'puppet-hdm', :git => 'https://github.com/voxpupuli/puppet-hdm.git', :branch => 'master' 5 | mod 'puppet-rvm', '3.0.0' 6 | mod 'puppet-systemd', '8.1.0' 7 | mod 'puppetlabs-apt', '10.0.1' 8 | mod 'puppetlabs-concat', '9.1.0' 9 | mod 'puppetlabs-docker', '10.1.0' 10 | mod 'puppetlabs-firewall', '8.1.4' 11 | mod 'puppetlabs-inifile', '6.2.0' 12 | mod 'puppetlabs-postgresql', '10.5.0' 13 | mod 'puppetlabs-puppetdb', '8.1.0' 14 | mod 'puppetlabs-stdlib', '9.7.0' 15 | mod 'puppetlabs-vcsrepo', '7.0.0' 16 | mod 'puppet-chrony', '4.0.0' 17 | -------------------------------------------------------------------------------- /app/controllers/group_memberships_controller.rb: -------------------------------------------------------------------------------- 1 | class GroupMembershipsController < ApplicationController 2 | load_and_authorize_resource :group 3 | add_breadcrumb "Home", :root_path 4 | add_breadcrumb "Groups", :groups_path 5 | 6 | def edit 7 | add_breadcrumb @group.name, group_path(@group) 8 | add_breadcrumb "Edit Memberships", edit_group_group_memberships_path(@group) 9 | end 10 | 11 | def update 12 | if @group.update(group_params) 13 | redirect_to @group, notice: "Group memberships were updated successfully." 14 | else 15 | render action: "edit" 16 | end 17 | end 18 | 19 | private 20 | 21 | def group_params 22 | params.expect(group: [user_ids: []]) 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /test/system/access_nodes_keys_test.rb: -------------------------------------------------------------------------------- 1 | require "application_system_test_case" 2 | 3 | class AccessNodesKeysTest < ApplicationSystemTestCase 4 | setup do 5 | Rails.configuration.hdm[:authentication_disabled] = true 6 | end 7 | 8 | teardown do 9 | Rails.configuration.hdm[:authentication_disabled] = false 10 | end 11 | 12 | test "accessing a key of a node" do 13 | visit root_url 14 | 15 | click_on "Show Environments" 16 | 17 | slim_select "development", from: "environment" 18 | 19 | slim_select "testhost (development)", from: "node" 20 | 21 | click_on "hdm::integer" 22 | 23 | click_on "common.yaml" 24 | 25 | assert has_css?("textarea[name=value]", text: "1") 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /db/migrate/20230419094052_add_role_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddRoleToUsers < ActiveRecord::Migration[7.0] 2 | def up 3 | add_column :users, :role, :string 4 | execute "UPDATE users SET role = 'admin' WHERE admin = '1'" 5 | execute "UPDATE users SET role = 'regular' WHERE admin = '0'" 6 | change_column :users, :role, :string, null: false, default: "regular" 7 | remove_column :users, :admin 8 | end 9 | 10 | def down 11 | add_column :users, :admin, :boolean, default: false # rubocop:disable Rails/ThreeStateBooleanColumn 12 | execute "UPDATE users SET admin = '1' WHERE role = 'admin'" 13 | change_column :users, :admin, :boolean, default: false, null: false 14 | remove_column :users, :role 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /config/database.yml: -------------------------------------------------------------------------------- 1 | # SQLite. Versions 3.8.0 and up are supported. 2 | # gem install sqlite3 3 | # 4 | # Ensure the SQLite 3 gem is defined in your Gemfile 5 | # gem 'sqlite3' 6 | # 7 | default: &default 8 | adapter: sqlite3 9 | pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 10 | timeout: 5000 11 | 12 | development: 13 | <<: *default 14 | database: db/development.sqlite3 15 | 16 | # Warning: The database defined as "test" will be erased and 17 | # re-generated from your development database when you run "rake". 18 | # Do not set this db to the same as development or production. 19 | test: 20 | <<: *default 21 | database: db/test.sqlite3 22 | 23 | production: 24 | <<: *default 25 | database: db/production.sqlite3 26 | -------------------------------------------------------------------------------- /config/initializers/inflections.rb: -------------------------------------------------------------------------------- 1 | # Be sure to restart your server when you modify this file. 2 | 3 | # Add new inflection rules using the following format. Inflections 4 | # are locale specific, and you may define rules for as many different 5 | # locales as you wish. All of these examples are active by default: 6 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 7 | # inflect.plural /^(ox)$/i, "\\1en" 8 | # inflect.singular /^(ox)en/i, "\\1" 9 | # inflect.irregular "person", "people" 10 | # inflect.uncountable %w( fish sheep ) 11 | # end 12 | 13 | # These inflection rules are supported but not enabled by default: 14 | # ActiveSupport::Inflector.inflections(:en) do |inflect| 15 | # inflect.acronym "RESTful" 16 | # end 17 | -------------------------------------------------------------------------------- /app/models/concerns/has_groups.rb: -------------------------------------------------------------------------------- 1 | module HasGroups 2 | extend ActiveSupport::Concern 3 | 4 | included do 5 | has_many :group_memberships, dependent: :destroy 6 | has_many :groups, through: :group_memberships 7 | end 8 | 9 | def full_name_with_username 10 | "#{first_name} #{last_name} (#{username})" 11 | end 12 | 13 | def may_access?(record) 14 | return true if groups.none? 15 | 16 | restrictable = record.class.name.downcase 17 | raise "Unknown entity #{record.class}" unless restrictable.in? Group::RESTRICTABLES 18 | 19 | applicable_groups = groups.where(restrict: restrictable) 20 | return true if applicable_groups.none? 21 | 22 | applicable_groups.any? { |g| g.may_access?(record) } 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /app/models/hiera_data/interpolation.rb: -------------------------------------------------------------------------------- 1 | class HieraData 2 | module Interpolation 3 | VARIABLE_REGEXP = /%{(::)?(facts|trusted)\.([^}]+)}/ 4 | 5 | module_function 6 | 7 | def interpolate_globs(path:, datadir: nil) 8 | Dir.glob(path, base: datadir).sort 9 | end 10 | 11 | def interpolate_facts(path:, facts:) 12 | path.gsub(VARIABLE_REGEXP) do |variable_string| 13 | _, _, scope, name = variable_string.match(VARIABLE_REGEXP).to_a 14 | name = "trusted.#{name}" if scope == "trusted" 15 | value = facts.dig(*name.split(".")) 16 | value || variable_string 17 | end 18 | end 19 | 20 | def replace_variables_with_globs(path) 21 | path.gsub(VARIABLE_REGEXP, "*") 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /test/controllers/page_controller_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PageControllerTest < ActionDispatch::IntegrationTest 4 | test "system without an existing user shouldn't get index but initial setup page" do 5 | User.destroy_all 6 | get root_url 7 | assert_redirected_to initial_setup_path 8 | end 9 | 10 | test "system with existing user should get index" do 11 | FactoryBot.create(:user) 12 | get root_url 13 | assert_response :success 14 | end 15 | 16 | test "system with authentication disabled should get index" do 17 | Rails.configuration.hdm["authentication_disabled"] = true 18 | get root_url 19 | assert_response :success 20 | Rails.configuration.hdm["authentication_disabled"] = nil 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | inherit_from: .rubocop_todo.yml 3 | 4 | plugins: 5 | - rubocop-rails 6 | - rubocop-capybara 7 | - rubocop-performance 8 | - rubocop-factory_bot 9 | 10 | AllCops: 11 | TargetRubyVersion: 3.4 12 | NewCops: enable 13 | Include: 14 | - '**/*.rb' 15 | Exclude: 16 | - bin/* 17 | - config/application.rb 18 | - config/environments/* 19 | - db/migrate/*active_storage.rb 20 | - db/schema.rb 21 | - vendor/**/* 22 | - .vendor/**/* 23 | 24 | Naming/PredicatePrefix: 25 | ForbiddenPrefixes: 26 | - "is_" 27 | - "have_" 28 | 29 | Rails/I18nLocaleTexts: 30 | Enabled: false 31 | 32 | Style/SafeNavigationChainLength: 33 | Enabled: false 34 | 35 | Metrics/ClassLength: 36 | Exclude: 37 | - "test/**/*.rb" 38 | -------------------------------------------------------------------------------- /config/ci.rb: -------------------------------------------------------------------------------- 1 | # Run using bin/ci 2 | 3 | CI.run do 4 | step "Setup", "bin/setup --skip-server" 5 | 6 | step "Style: Ruby", "bin/rubocop" 7 | 8 | step "Security: Importmap vulnerability audit", "bin/importmap audit" 9 | 10 | step "Tests: Rails", "bin/rails test" 11 | step "Tests: System", "bin/rails test:system" 12 | step "Tests: Seeds", "env RAILS_ENV=test bin/rails db:seed:replant" 13 | 14 | # Optional: set a green GitHub commit status to unblock PR merge. 15 | # Requires the `gh` CLI and `gh extension install basecamp/gh-signoff`. 16 | # if success? 17 | # step "Signoff: All systems go. Ready for merge and deploy.", "gh signoff" 18 | # else 19 | # failure "Signoff: CI failed. Do not merge or deploy.", "Fix the issues and try again." 20 | # end 21 | end 22 | -------------------------------------------------------------------------------- /test/integration/diff_environments_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class DiffEnvironmentsTest < ActionDispatch::IntegrationTest 4 | setup do 5 | @user = FactoryBot.create(:user) 6 | sign_in_as(@user) 7 | end 8 | 9 | test "showing node in different environment displays diff" do 10 | get environment_node_key_path("eyaml", "1m73otky.betadots.training", "1j1wdwae") 11 | 12 | assert_response :success 13 | assert_select "button#tab-diff-data_file_common-yaml" 14 | end 15 | 16 | test "performing a lookup in different environment displays diff" do 17 | get environment_node_key_lookup_path("hdm", "1m73otky.betadots.training", "testmod::integer") 18 | 19 | assert_response :success 20 | assert_select "button#tab-diff-lookup-new_key" 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /app/views/keys/_key_list.html.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 6 | <%= icon "search" %> 7 | 8 | <%= text_field_tag :search, params[:search], class: "form-control", placeholder: "Search", data: {key_filter_target: "input", action: "keyup->key-filter#filter"} %> 9 |
10 |
11 | <% @keys.each do |key| %> 12 | <%= link_to key, environment_node_key_path(@environment, @node, key), class: "list-group-item list-group-item-action #{"active" if key == @key}", data: {key_filter_target: "keys"} %> 13 | <% end %> 14 |
15 |
16 | -------------------------------------------------------------------------------- /app/views/shared/_auth_navigation.html.erb: -------------------------------------------------------------------------------- 1 | <% if Ldap.configured? || Saml.configured? %> 2 | 20 | <% end %> 21 | -------------------------------------------------------------------------------- /test/models/group_test.rb: -------------------------------------------------------------------------------- 1 | require "test_helper" 2 | 3 | class GroupTest < ActiveSupport::TestCase 4 | class ValidationsTest < ActiveSupport::TestCase 5 | setup do 6 | @group = Group.new 7 | @group.rules = [/a/] 8 | end 9 | 10 | test "name needs to be present" do 11 | @group.restrict = "environment" 12 | assert_not @group.valid? 13 | @group.name = "test" 14 | assert @group.valid? 15 | end 16 | 17 | %w[environment node key].each do |restrictable| 18 | test "#{restrictable} rules need to be valid regexps" do 19 | @group.name = "regexp test" 20 | @group.restrict = restrictable 21 | assert @group.valid? 22 | @group.rules = ["*"] 23 | assert_not @group.valid? 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /test/services/puppet_db_client_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class PuppetDbClientTest < ActiveSupport::TestCase 4 | test "::client can be called with `pem` configuration" do 5 | old_config = Rails.configuration.hdm.puppet_db 6 | Rails.configuration.hdm.puppet_db = { 7 | server: "https://localhost", 8 | pem: { 9 | cert: "tmp/test.certomat", 10 | key: "tmp/test.key", 11 | ca_file: "tmp/test.ca" 12 | } 13 | } 14 | 15 | client = PuppetDbClient.client 16 | assert_kind_of PuppetDB::Client, client 17 | 18 | Rails.configuration.hdm.puppet_db = old_config 19 | # Some of the options passed above get promoted to class level default options, so we need to reset them here 20 | PuppetDB::Client.default_options = {} 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /vagrant/hdm/hiera.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 5 3 | defaults: 4 | # The default value for "datadir" is "data" under the same directory as the hiera.yaml 5 | # file (this file) 6 | # When specifying a datadir, make sure the directory exists. 7 | # See https://puppet.com/docs/puppet/latest/environments_about.html for further details on environments. 8 | # datadir: data 9 | # data_hash: yaml_data 10 | lookup_key: eyaml_lookup_key 11 | options: 12 | pkcs7_private_key: /etc/puppetlabs/puppet/keys/private_key.pkcs7.pem 13 | pkcs7_public_key: /etc/puppetlabs/puppet/keys/public_key.pkcs7.pem 14 | 15 | hierarchy: 16 | - name: "Per-node data (yaml version)" 17 | path: "nodes/%{::trusted.certname}.yaml" 18 | - name: "Other YAML hierarchy levels" 19 | paths: 20 | - "common.yaml" 21 | -------------------------------------------------------------------------------- /app/javascript/controllers/key_filter_controller.js: -------------------------------------------------------------------------------- 1 | import { Controller } from "@hotwired/stimulus" 2 | 3 | export default class extends Controller { 4 | static targets = ["input", "keys"]; 5 | 6 | connect() { 7 | this.filter(); 8 | } 9 | 10 | filter() { 11 | const search = this.inputTarget.value; 12 | this.keysTargets.forEach( keyLink => { 13 | if (search == "" || keyLink.innerText.indexOf(search) >= 0) { 14 | keyLink.classList.remove("d-none"); 15 | const url = new URL(keyLink.href); 16 | url.searchParams.set('search', search); 17 | keyLink.href = url.toString(); 18 | } else { 19 | keyLink.classList.add("d-none"); 20 | } 21 | }); 22 | } 23 | 24 | submit(event) { 25 | event.stopPropagation(); 26 | event.preventDefault(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/system/search_key_test.rb: -------------------------------------------------------------------------------- 1 | require "application_system_test_case" 2 | 3 | class SearchKeyTest < ApplicationSystemTestCase 4 | setup do 5 | Rails.configuration.hdm[:authentication_disabled] = true 6 | end 7 | 8 | teardown do 9 | Rails.configuration.hdm[:authentication_disabled] = false 10 | end 11 | 12 | test "searching for a key" do 13 | visit root_url 14 | 15 | click_on "Show Environments" 16 | 17 | slim_select "development", from: "environment" 18 | 19 | fill_in "key", with: "hdm::integer\n" 20 | 21 | assert has_css?("h2", text: "Search Results") 22 | 23 | click_on "Eyaml hierarchy" 24 | 25 | click_on Rails.root.join("test/fixtures/files/puppet/environments/development/data/common.yaml").to_s 26 | 27 | assert has_css?(".accordion-body pre", text: "1") 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /app/views/environments/_select_environment.html.erb: -------------------------------------------------------------------------------- 1 | <%= form_tag "" do |form| %> 2 |
3 | <%= label_tag :environment, "Select environment" %> 4 | 12 |
13 | <% end %> 14 | -------------------------------------------------------------------------------- /test/fixtures/files/puppet/environments/lookup_tests/data/common.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | hdm_integer: 93 3 | hdm_unique_array: 4 | - common 5 | hdm_duplicates_in_array: 6 | - node 7 | - zone 8 | - common 9 | hdm_nested_array: 10 | - from_common 11 | - - nested 12 | - list 13 | hdm_simple_hash: 14 | origin: common 15 | added_by_common: common 16 | hdm_nested_hash: 17 | origin: common 18 | nested_hash: 19 | integer: 32 20 | added_by_common: common 21 | hdm_mixed_types: 42 22 | hdm_mixed_types2: 23 | from_common: 42 24 | hdm_integer_with_duplicates: 2 25 | lookup_options: 26 | '^hdm_duplicates': 27 | merge: hash 28 | hdm_duplicates_in_array: 29 | merge: unique 30 | hash_syntax: 31 | merge: 32 | strategy: deep 33 | hdm_mixed_types: 34 | merge: deep 35 | hdm_integer_with_duplicates: 36 | merge: unique 37 | -------------------------------------------------------------------------------- /test/models/saml_test.rb: -------------------------------------------------------------------------------- 1 | require 'test_helper' 2 | 3 | class SamlTest < ActiveSupport::TestCase 4 | test "::configured? checks if configuration exists" do 5 | Rails.configuration.hdm[:saml] = SAML_TEST_CONFIG.dup 6 | assert Saml.configured? 7 | Rails.configuration.hdm.delete(:saml) 8 | assert_not Saml.configured? 9 | end 10 | 11 | test "#settings correctly configures ruby-saml" do 12 | Rails.configuration.hdm[:saml] = SAML_TEST_CONFIG.dup 13 | settings = Saml.new.settings 14 | assert_equal "hdm-test", settings.sp_entity_id 15 | assert_equal "https://testsso", settings.idp_sso_service_url 16 | assert_equal "test", settings.idp_cert_fingerprint 17 | assert_equal "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", settings.name_identifier_format 18 | Rails.configuration.hdm.delete(:saml) 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /app/models/group.rb: -------------------------------------------------------------------------------- 1 | class Group < ApplicationRecord 2 | RESTRICTABLES = %w[environment node key].freeze 3 | 4 | serialize :rules, type: Array, coder: YAML 5 | 6 | has_many :group_memberships, dependent: :destroy 7 | has_many :users, through: :group_memberships 8 | 9 | validates :name, presence: true, uniqueness: true 10 | validates :restrict, inclusion: RESTRICTABLES 11 | validates :rules, regexp: true, length: { minimum: 1 } 12 | 13 | def destroyable? 14 | group_memberships.none? 15 | end 16 | 17 | def may_access?(record) 18 | record_class = record.class.name.downcase 19 | raise "Cannot check #{record_class}" unless record_class == restrict 20 | 21 | compiled_rules.any? { |r| r.match(record.name) } 22 | end 23 | 24 | private 25 | 26 | def compiled_rules 27 | @compiled_rules ||= rules.map { |r| Regexp.new(r) } 28 | end 29 | end 30 | --------------------------------------------------------------------------------