<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之旅 廣告
                - 目錄結構 ``` [root@ansible-20 ansible]# tree roles/nginx/ -L 2 roles/nginx/ ├── files │?? └── conf ├── tasks │?? └── main.yml └── templates ``` - hosts文件 ``` [root@ansible-20 ansible]# cat hosts [nginx] 192.168.47.21 ``` - 執行文件 ``` [root@ansible-20 ansible]# cat nginx_conf.yml - hosts: nginx vars: remote_conf_basedir: /opt/nginx/ remote_conf: /opt/nginx/conf remote_backup_basedir: /opt/nginx/conf_backup/ remote_backup: /opt/nginx/conf_backup/{{ lookup('pipe','date +%Y%m%d-%H-%M-%S') }} local_gitdir: /root/gitdir/push_conf/nginx_conf cmd_git_fetch: git fetch cmd_git_rebase: git rebase origin/master service_restart: "/opt/nginx/sbin/nginx -s reload" roles: - nginx ``` - task文件 ``` # git拉取最新版本的配置文件 - name: git fech command: chdir={{ local_gitdir }} {{ item }} connection: local with_items: - "{{ cmd_git_fetch }}" - "{{ cmd_git_rebase }}" # 創建備份目錄 - name: mkdir backup basedir file: name: "{{ item }}" state: directory with_items: - "{{ remote_backup_basedir }}" # 備份配置文件到備份目錄 - name: backup conf shell: cp -a "{{ remote_conf }}" "{{ remote_backup }}" # 同步最新的配置文件 - name: sync synchronize: src: "{{ local_gitdir }}/conf" dest: "{{ remote_conf_basedir }}" delete: yes recursive: yes register: service_status # 如果文件有改變就重啟服務 - name: reload nginx shell: "{{ service_restart }}" when: service_status.changed ```
                  <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>

                              哎呀哎呀视频在线观看