久久久久久久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 中提升了權(quán)限,但仍無法運行腳本

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

          <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 中提升了權(quán)限,但仍無法運行腳本的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                限時送ChatGPT賬號..

                我嘗試在使用 ansible 將它復(fù)制到主機上后在主機上運行它.該腳本有 777 個權(quán)限.

                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 設(shè)置不同的 ORACLE_HOME 和 PATH 環(huán)境變量

                - 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
                

                盡管提升了權(quán)限,但我觀察到除非我添加如下環(huán)境變量,否則任務(wù)不會執(zhí)行

                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.

                我的問題是,為什么盡管升級了權(quán)限,任務(wù)仍然運行.當(dāng)我嘗試通過登錄服務(wù)器并在執(zhí)行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.

                推薦答案

                這取決于您實際設(shè)置環(huán)境變量的位置.在遠程機器上登錄時執(zhí)行腳本與通過 ssh 像 Ansible 一樣運行腳本是有區(qū)別的(參見例如 區(qū)分交互式登錄和非交互式非登錄外殼).根據(jù) shell 的類型和您的系統(tǒng),加載不同的 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.

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

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

                相關(guān)文檔推薦

                PowerShell MySQL Backup Script Error in Task Scheduler 0x00041301(任務(wù)計劃程序中的 PowerShell MySQL 備份腳本錯誤 0x00041301)
                Is there a way to get information about a server using SQL(有沒有辦法使用 SQL 獲取有關(guān)服務(wù)器的信息)
                How to get first element by XPath in Oracle(如何在 Oracle 中通過 XPath 獲取第一個元素)
                Oracle XMLTable- fetching column from parent node(Oracle XMLTable-從父節(jié)點獲取列)
                How to extract element-path from XMLType Node?(如何從 XMLType 節(jié)點中提取元素路徑?)
                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>
                          主站蜘蛛池模板: 国产成人精品免高潮在线观看 | 亚洲精品视频免费观看 | 日韩午夜精品 | 久久精品1 | 日韩综合网 | 国产成在线观看免费视频 | 日韩国产欧美一区 | 国产一区二区影院 | 精品日韩在线 | 亚洲国产网站 | 天天操天天射天天 | 亚洲日韩中文字幕一区 | 免费观看一级特黄欧美大片 | 久久久久国产精品一区二区 | 欧美黄色片 | 久久不卡区 | a级大片 | 久久久久电影 | 国产不卡一区在线观看 | 国产精品一区二区视频 | 色av一区二区三区 | 欧美国产精品久久久 | 国产精品无 | 亚洲一区免费 | 亚洲人成人一区二区在线观看 | 一区二区三区在线免费观看 | 日韩欧美视频免费在线观看 | 亚洲精品久久久久久久不卡四虎 | 精品国产乱码久久久久久中文 | 精品久久久久久亚洲精品 | 久久国色 | 久久手机在线视频 | 日韩在线一区二区三区 | 欧美精品久久久 | 男人久久天堂 | 欧美综合视频 | 红桃视频一区二区三区免费 | 老熟女毛片 | 亚洲图片一区二区三区 | 精品国产乱码久久久久久图片 | 夜夜骑天天干 |