Centos 6.3下Puppet功能模組執行個體筆記

來源:互聯網
上載者:User

今天來介紹Puppet的具體實用功能,其實我的理解就是怎麼偷懶,呵呵。

1.填充檔案內容:

(server):

修改server端設定檔:

# vi /etc/puppet/manifests/site.pp

-----------------

node default{

 file { "/tmp/test":

         content=> "this is a test file";

}

}

-----------------

重啟puppetmaster,更新設定檔資訊。

# service puppetmaster restart

(client):

重啟puppet(可不用重啟)

# service puppet restart

同步檔案:

# puppetd --server server.example.com  --test

------------------

warning: peer certificate won't be verified in this SSL session

info: Caching certificate for client.example.com

info: Caching certificate_revocation_list for ca

info: Caching catalog for client.example.com

info: Applying configuration version '1369124449'

notice: /Stage[main]//Node[default]/File[/tmp/test]/ensure: defined content as '{md5}100b144907af2a4786003758a0a6a563'

info: Creating state file /var/lib/puppet/state/state.yaml

notice: Finished catalog run in 0.02 seconds

------------------

查看/tmp/test檔案及檔案內容

# cat /tmp/test

-----------

this is a test file

-----------

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.