ansible-playbook

    2熱度

    1回答

    我剛剛開始使用Ansible,並在閱讀完教程後(Ansible團隊名爲「docs」)我希望看到可用於劇本的所有屬性的完整列表。有人能夠提供這樣的清單嗎?我唯一能夠谷歌的是this old example,但它缺少像gather_facts這樣的東西。 也許有人有經驗的人可以在這裏粘貼一個包含所有屬性的正確結構的'骨架'。 在此先感謝。

    2熱度

    1回答

    我正試圖編寫一個在linux主機中運行的進程數不等於2時顯示失敗的劇本。以下劇本的作品,但是有沒有更好的方法呢?像是有任何具體的Ansible模塊來檢查進程的Linux主機? --- - hosts: web become: yes become_method: su become_user: webuser tasks: - name:

    1熱度

    1回答

    從Ansible遠程執行shell時出現意外的行爲。當我在遠程機器上執行下面的命令,結果是: $ echo $(pgrep -f jboss) 13248 現在如果我執行的Ansible殼我得到的回報倍數的PID命令: $ ansible jboss.servers -m shell -a 'echo $(pgrep -f jboss)' -u centos 10.3.9.155 | SU

    1熱度

    1回答

    我試圖代碼,其中一個遠程進程的PID被登記爲變量a劇本,然後我針對PID執行其它殼命令: - name: capture remote pid hosts: web.servers tasks: - name: capture PID shell: ps ax | grep eap | cut -d " " -f1 register:

    1熱度

    2回答

    我需要檢查用戶是否輸入了一個字母鍵或十進制(。)以外的任何符號。我把它放在一個if語句中,好奇是否有一個容易找到這個腳本的地方。任何幫助將不勝感激。

    3熱度

    1回答

    是否可以爲可選模塊的單個選項設置條件。 Using set_fact we can set condition aand use that variable in the ansible module. Alternatively is there any other option to set the condition using if loop in jinja or something l

    1熱度

    2回答

    我一直在嘗試使用Ansible手冊將主機名添加到我的主機文件。我Ansible戲看下面和我的主機文件駐留在/etc/ansible/hosts: - name: adding host playbook hosts: localhost connection: local tasks: - name: add host to ansible host fil

    -1熱度

    1回答

    我試圖在劇本中使用Jboss Module。按例如: # Deploy a hello world application - jboss: src: /tmp/hello-1.0-SNAPSHOT.war deployment: hello.war state: present 但是它似乎JBoss的模塊無法識別: : The offending line a

    0熱度

    2回答

    ,我希望這個任務收集不起作用它會註冊一個變種: - name: Find out whether syslog-ng is installed (yum) tags: syslog_forwarding command: yum -q list installed syslog-ng register: syslog_ng_check failed_when

    3熱度

    1回答

    查看Ansible documentation中的核心數據庫模塊顯示沒有Oracle模塊的跡象。通過Ansible for Oracle數據庫處理SQL/PLSQL部署的最佳方式是什麼? 我們是否期望使用Ansible Galaxy中的角色來處理這個問題?很少有人似乎已經下載了Galaxy for Oracle上列出的角色。