Jump to content
  • entries
    142
  • comments
    0
  • views
    87552

Puppet On Azure | Βήμα 4, Puppet Automation


proximagr

1174 views

 Share

Puppet On Azure
Puppet Automation – Δημιουργία αρχείου στους Servers που κάνουμε Manage
Έχουμε εγκαταστήσει το Puppet και τους Agents, τώρα είναι η ώρα να δούμε ένα test automation.
Παράδειγμα «Δημιουργία αρχείου»
Στον Puppet Master τρέχουμε:
nano /etc/puppet/manifests/site.pp
και δίνουμε όνομα του αρχείου και το path
το security “mode”
και το περιεχόμενο του αρχείου ”content”
mopb46.jpg
Και το σώζουμε
Τώρα πάμε στον Slave να δούμε το αρχείο. Μπορούμε να περιμένουμε μισή ώρα μέχρι να κάνει request ο agent στο master ή να τρέξουμε “puppet agent –test” για να το επισπεύσουμε
mopb47.jpg
Και με “nano /tmp/puppet-test” βλέπουμε το περιεχόμενο
mopb48.jpg?w=300
Τώρα για να δημιουργήσουμε το αρχείο και στα Linux αλλά και σε Windows παραμετροποιούμε το site.pp το παρακάτω:
if $osfamily == 'windows' {file { 'c:/temp/pupet-test.txt': ensure => file, mode=>'0644',content => "this is the first puppet test file.n" }}else {file{'/tmp/puppet-test':ensure => "present",mode => 0644,content => "this is the first puppet test file.n",}}
mopb49.jpg
source: http://www.e-apostolidis.gr/%CE%B5%CE%BB%CE%BB%CE%B7%CE%BD%CE%B9%CE%BA%CE%AC/puppet-on-azure-%CE%B2%CE%AE%CE%BC%CE%B1-4-puppet-automation/

 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...