ã¯ããã«
ansible-navigator 3.0.0 ã§ãvars_prompt
ãã£ã¬ã¯ãã£ãã ansible.builtin.pause
ã¢ã¸ã¥ã¼ã« ã®ãããªãã¦ã¼ã¶ã¼ã®å
¥åãå¾
ã¤æ©è½ã¨çµã¿åããã¦ä½¿ãããã®ãªãã·ã§ã³ --enable-prompts
ï¼ç縮形㯠--ep
ï¼ã追å ããã¾ããã
è©²å½ changelog:
Add enable_prompts parameter for run subcommand (#1419) @shatakshiiii
Release v3.0.0 · ansible/ansible-navigator · GitHub
ãã®æ©è½ã試ãã¦ã¿ã¾ãã
- ç°å¢
- ansible-navigator 3.0.0
- ee:
ghcr.io/ansible/creator-ee:v0.14.1
ããã¾ã§ã®ä»æ§ã --enable-prompts
ã®å½¹å²
ããã©ã«ãã§ã¯ãPlaybook å®è¡ä¸ã¯ã¦ã¼ã¶ã¼ã®å ¥åãåãä»ããªãï¼ãã¡ããTUIã®æä½ã¯åãä»ããï¼ä»æ§ã«ãªã£ã¦ãã¾ãã
å ¬å¼ããã¥ã¡ã³ãã® FAQ ã«ãè¨è¼ãããã¾ãã
Why does the playbook hang when vars_prompt, pause/prompt or --ask-pass is used?
Frequently asked questions - Ansible Navigator Documentation
ããã¾ã§ã® ansible-navigator ã§ããã¢ã¼ãã£ãã¡ã¯ãï¼ãã°ã®ãããªãã®ï¼æ©è½ãç¡å¹åãã¦ã--mode stdout
ã§å®è¡ããã°å
¥åãåãä»ãããã¾ãããä»å追å ããã --enable-prompts
ãªãã·ã§ã³ãä»ããã ãã§ãã§ããããã«ãªãã¾ããã
--enable-prompts
ãªãã·ã§ã³ã使ãã¨ãå
¥åãåãä»ããããããã«ãªã代ããã«ãã¢ã¼ãã£ãã¡ã¯ãæ©è½ã¯ç¡å¹åããã--mode stdout
ç¸å½ Playbook ãå®è¡ããã¾ãããã®ç¹ã¯ããã¾ã§ã¨å¤ããã¾ããã
表示ä¸ã¯ ansible-playbook
ã³ãã³ãããã®ã¾ã¾å®è¡ãããããªã¤ã¡ã¼ã¸ã«ãªãã¾ãã
ãããã
Playbook
試ã Playbook ã¯ä»¥ä¸ã®ã¨ããã§ããvars_prompt
ã§ãã¦ã¼ã¶ã¼ã®å
¥åãå¾
ã£ã¦ãå
¥åãããå¤ãå¤æ° msg
ã«å
¥ãã¾ãã
--- - name: Hello hosts: localhost gather_facts: false vars_prompt: name: msg prompt: What is your message? private: false tasks: - name: Hello ansible.builtin.debug: msg: "{{ msg }}"
ansible-navigator.yml
ansible-navigator ã®è¨å®ãã¡ã¤ã«ã§ãã ansible-navigator.yml
ã¯ä»åã¯ãªãã§ããããããããã©ã«ãå¤ã§å®è¡ãã¾ãã
ããã©ã«ãã ã¨
æ¯è¼ã®ããã«ã --enable-prompts
ãªãã®ããã©ã«ãã ã¨ã©ããªãã試ãã¾ãã
ansible-navigator 㧠var_prompt ããã Playbook ãå®è¡ãã¦çµãããªãä¾ pic.twitter.com/xpNFLSrh5c
— ããã¡ (@akira6592) 2023å¹´4æ7æ¥
å³ä¸ã« Running
ã¨è¡¨ç¤ºãããã¾ã¾ã«ãªã£ã¦ããéãããã¤ã¾ã§ç«ã£ã¦ãå®äºãã¾ãããPlaybook ã¨ãã¦ã¯ vars_prompt
ã§å
¥åãå¾
ã£ã¦ãã¾ããã§ãããããã§ä½ãå
¥åãã¦ã ansible-navigator ã®TUI ã®æä½ã¨ãã¦æ±ããããããPlaybook ã«å
¥åã渡ããªãç¶æ
ã§ãã
--enable-prompts
ãã
次㫠--enable-prompts
ãã¤ãã¦å®è¡ãã¾ãã
ansible-navigator 㧠--enable-prompts ãªãã·ã§ã³ãã¤ãã¦ãvars_prompt ã«å¯¾è©±å¼å ¥åããä¾ pic.twitter.com/GidqRatAQe
— ããã¡ (@akira6592) 2023å¹´4æ7æ¥
è¦æ
£ãã --mode stdout
ç¸å½ã®è¡¨ç¤ºã¨ãªããvars_prompt
ã§æå®ããããã³ããæåã表示ãããå
¥åãåãä»ãããã¾ããã
ãªãã--enable-prompts true
ã¨æå®ãã㨠ERROR! the playbook: true could not be found
ã¨ããã¨ã©ã¼ã«ãªãã¾ããåã« --enable-prompt
ã ãæå®ãã¾ãï¼ããããããã¾ããï¼ã
ãããã«
æ¬æ¥ã¯ãAutomation Controller ã§å®è¡ããã¨ãã®ãã¨ãèããã¨ããã®ãããªã¦ã¼ã¶ã¼ã®å ¥åãå¾ ã¤ Playbook ã¯é¿ããã¹ãã§ãã
ã§ããã諸äºæ ã§å ¥åãåãä»ãããã¨ãã¯ä¾¿å©ãªæ¹æ³ã ã¨æãã¾ãããã ããã¢ã¼ãã£ãã¡ã¯ããç¡å¹ã«ãªãç¹ã¯æ³¨æãå¿ è¦ã§ãã