久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <legend id='Xikgq'><style id='Xikgq'><dir id='Xikgq'><q id='Xikgq'></q></dir></style></legend>

    1. <small id='Xikgq'></small><noframes id='Xikgq'>

    2. <tfoot id='Xikgq'></tfoot>
        <bdo id='Xikgq'></bdo><ul id='Xikgq'></ul>
      <i id='Xikgq'><tr id='Xikgq'><dt id='Xikgq'><q id='Xikgq'><span id='Xikgq'><b id='Xikgq'><form id='Xikgq'><ins id='Xikgq'></ins><ul id='Xikgq'></ul><sub id='Xikgq'></sub></form><legend id='Xikgq'></legend><bdo id='Xikgq'><pre id='Xikgq'><center id='Xikgq'></center></pre></bdo></b><th id='Xikgq'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Xikgq'><tfoot id='Xikgq'></tfoot><dl id='Xikgq'><fieldset id='Xikgq'></fieldset></dl></div>

    3. 盡管在 Ansible 中提升了權限,但仍無法運行腳本

      Unable to run script despite escalating privilege in Ansible(盡管在 Ansible 中提升了權限,但仍無法運行腳本)

          <tbody id='vFj1c'></tbody>
          1. <small id='vFj1c'></small><noframes id='vFj1c'>

          2. <tfoot id='vFj1c'></tfoot><legend id='vFj1c'><style id='vFj1c'><dir id='vFj1c'><q id='vFj1c'></q></dir></style></legend>

              • <bdo id='vFj1c'></bdo><ul id='vFj1c'></ul>
                <i id='vFj1c'><tr id='vFj1c'><dt id='vFj1c'><q id='vFj1c'><span id='vFj1c'><b id='vFj1c'><form id='vFj1c'><ins id='vFj1c'></ins><ul id='vFj1c'></ul><sub id='vFj1c'></sub></form><legend id='vFj1c'></legend><bdo id='vFj1c'><pre id='vFj1c'><center id='vFj1c'></center></pre></bdo></b><th id='vFj1c'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vFj1c'><tfoot id='vFj1c'></tfoot><dl id='vFj1c'><fieldset id='vFj1c'></fieldset></dl></div>
                本文介紹了盡管在 Ansible 中提升了權限,但仍無法運行腳本的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我嘗試在使用 ansible 將它復制到主機上后在主機上運行它.該腳本有 777 個權限.

                Im trying to run a shell script on the host machine after copying it over there using ansible. The script has 777 permissions.

                請閱讀以下問題,因為它提供了我們正在嘗試處理的實際問題的完整范圍

                Please read the below question as it gives the full scope of the actual issue that we are trying to deal with

                使用 Ansible 設置不同的 ORACLE_HOME 和 PATH 環境變量

                - name: Run the Script [List]
                  shell: "/tmp/sqlscript/sql_select.sh {{item}} >> /tmp/sqlscript/output.out"
                  become: yes
                  become_method: sudo
                  become_user: oracle
                  register: orh
                  with_items: "{{ factor_dbs.split('\n') }}"
                

                下面是shell腳本

                #!/bin/bash
                source $HOME/bin/gsd_xenv $1 &> /dev/null
                
                sqlplus -s <<EOF
                / as sysdba
                set heading off
                
                
                select d.name||','||i.instance_name||','||i.host_name||';' from v\$database d,v\$instance i;
                
                EOF
                

                盡管提升了權限,但我觀察到除非我添加如下環境變量,否則任務不會執行

                Despite escalating the privileges, I observed that the task is not executing unless I add environment variables like below

                - name: Run the script [List]
                  shell: "/tmp/sqlscript/oracle_home.sh {{item}} >> /tmp/sqlscript/orahome.out"
                  become: yes
                  become_method: sudo
                  become_user: oracle
                  environment:
                     PATH: "/home/oracle/bin:/usr/orasys/12.1.0.2r10/bin:/usr/bin:/bin:/usr/ucb:/sbin:/usr/sbin:/etc:/usr/local/bin:/oradata/epdmat/goldengate/config/sys"
                     ORACLE_HOME: "/usr/orasys/12.1.0.2r10"
                  register: orh
                  with_items: "{{ factor_dbs.split('\n') }}"
                

                然而,這個劇本需要在具有不同路徑和 oracle_home 變量的不同主機上運行.

                However this playbook needs to be run across different hosts which have different path and oracle_home variables.

                我的問題是,為什么盡管升級了權限,任務仍然運行.當我嘗試通過登錄服務器并在執行sudo su oracle"后手動運行相同的腳本時,它似乎運行良好.

                My question is, why doest the task run despite escalating the permissions. When I try to run the same script manually by logging into the server and after doing "sudo su oracle", it seems to be running fine.

                推薦答案

                這取決于您實際設置環境變量的位置.在遠程機器上登錄時執行腳本與通過 ssh 像 Ansible 一樣運行腳本是有區別的(參見例如 區分交互式登錄和非交互式非登錄外殼).根據 shell 的類型和您的系統,加載不同的 bash 配置文件.

                It depends on where you actually set your environment variables. There is a difference in executing a script when you are logged in at a remote machine, and running a script over ssh as Ansible does (see e.g., Differentiate Interactive login and non-interactive non-login shell). Depending on the type of shell and your system, different bash profiles are loaded.

                這篇關于盡管在 Ansible 中提升了權限,但仍無法運行腳本的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                PowerShell MySQL Backup Script Error in Task Scheduler 0x00041301(任務計劃程序中的 PowerShell MySQL 備份腳本錯誤 0x00041301)
                Is there a way to get information about a server using SQL(有沒有辦法使用 SQL 獲取有關服務器的信息)
                How to get first element by XPath in Oracle(如何在 Oracle 中通過 XPath 獲取第一個元素)
                Oracle XMLTable- fetching column from parent node(Oracle XMLTable-從父節點獲取列)
                How to extract element-path from XMLType Node?(如何從 XMLType 節點中提取元素路徑?)
                Add attribute to xmltype with value taken from sequence(使用取自序列的值將屬性添加到 xmltype)

                1. <tfoot id='MguM5'></tfoot>

                  <legend id='MguM5'><style id='MguM5'><dir id='MguM5'><q id='MguM5'></q></dir></style></legend>

                    <small id='MguM5'></small><noframes id='MguM5'>

                        <tbody id='MguM5'></tbody>
                        <i id='MguM5'><tr id='MguM5'><dt id='MguM5'><q id='MguM5'><span id='MguM5'><b id='MguM5'><form id='MguM5'><ins id='MguM5'></ins><ul id='MguM5'></ul><sub id='MguM5'></sub></form><legend id='MguM5'></legend><bdo id='MguM5'><pre id='MguM5'><center id='MguM5'></center></pre></bdo></b><th id='MguM5'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='MguM5'><tfoot id='MguM5'></tfoot><dl id='MguM5'><fieldset id='MguM5'></fieldset></dl></div>

                        • <bdo id='MguM5'></bdo><ul id='MguM5'></ul>
                          主站蜘蛛池模板: 亚洲男人天堂 | 亚洲一区二区久久久 | 亚洲精品在线免费 | 免费在线一区二区 | 波多野结衣在线观看一区二区三区 | 国产美女福利在线观看 | 欧美福利 | 天天操夜夜看 | 免费xxxx大片国产在线 | 国产传媒毛片精品视频第一次 | 天天色综 | 亚洲精品888| 玖玖视频免费 | 久久久久久久国产精品 | 性做久久久久久免费观看欧美 | 午夜一区 | 亚洲欧美精品国产一级在线 | 久久国产亚洲 | 久艹av| 亚洲精品久久久久中文字幕二区 | 久久一 | 久久成人一区 | 久久久久久久久国产精品 | 一区二区三区四区视频 | 国产一级片一区二区三区 | 精品自拍视频 | 中文字幕av在线 | 亚洲精选一区二区 | 日本又色又爽又黄的大片 | 看一级毛片视频 | 精品日韩在线 | 国产精品久久久久久久久久了 | 毛片com| 欧美国产日韩一区 | 91成人免费电影 | 日日草夜夜草 | 亚洲视频免费 | 国产精品国产a | 美女久久 | 国产精品三级 | 欧美日高清视频 |