<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## 軟件管理模塊[yum][1] ### 在命令行使用yum模塊安裝 ``` ansible node2.test.com -m yum -a 'name=httpd' ``` ### 選項 ![](http://om4h63cja.bkt.clouddn.com/17-7-11/66745584.jpg) ### 在playbook中這樣使用 ``` --- - name: yum test hosts: b1.hi.com tasks: - name: yum install pkg yum: name={{ item }} update_cache=True with_items: - git - vim-enhanced - tree - screen # 更新所有軟件 - name: upgrade pkg yum: updade_cache=yes upgrade=yes ``` ### 示例 ~~~ - name: install the latest version of Apache yum: name: httpd state: latest - name: remove the Apache package yum: name: httpd state: absent - name: install the latest version of Apache from the testing repo yum: name: httpd enablerepo: testing state: present - name: install one specific version of Apache yum: name: httpd-2.2.29-1.4.amzn1 state: present - name: upgrade all packages yum: name: '*' state: latest - name: install the nginx rpm from a remote repo yum: name: http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm state: present - name: install nginx rpm from a local file yum: name: /usr/local/src/nginx-release-centos-6-0.el6.ngx.noarch.rpm state: present - name: install the 'Development tools' package group yum: name: "@Development tools" state: present - name: install the 'Gnome desktop' environment group yum: name: "@^gnome-desktop-environment" state: present - name: List ansible packages and register result to print with debug later. yum: list: ansible ~~~ --- ## 服務管理[service][2] ### 選項 ![](http://om4h63cja.bkt.clouddn.com/17-7-12/95013435.jpg) ### 在命令行使用方式 ``` ansible node2.test.com -m service -a 'name=httpd state=started enabled=true' ansible node2.test.com -m service -a 'name=network state=restarted args=eth0' ``` ### 示例 ~~~ # Example action to start service foo, based on running process /usr/bin/foo - service: name: foo pattern: /usr/bin/foo state: started # Example action to restart network service for interface eth0 - service: name: network state: restarted args: eth0 ~~~ [1]:http://docs.ansible.com/ansible/yum_module.html [2]:http://docs.ansible.com/ansible/service_module.html
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看