ãã®è¨äºã¯ Ansible Advent Calendar 2024 ã® 18æ¥ç®ã®è¨äºã§ãã
ã¯ããã«
AAP(Ansible Automation Platform) ã«å«ã¾ãããAutomation Controller ãªã©ã® GUI ã®ãããã¯ããè¨å®ããããã® ansible.controller
ã¨ããã³ã¬ã¯ã·ã§ã³ãããã¾ãã
ansible.controller
ã³ã¬ã¯ã·ã§ã³ããã®ã¾ã¾ä½¿ã£ã¦ãè¯ãã®ã§ããããã便å©ã«ä½¿ãããã® infra.aap_configuration
ã¨ããã³ã¬ã¯ã·ã§ã³ãããã¾ãï¼from Automation Hub / from Ansible Galaxyï¼ã
redhat-cop
ï¼Red Hat Communities of Practiceï¼é
ä¸ã®ãªãã¸ããªã§ç®¡çããã¦ããã³ã¬ã¯ã·ã§ã³ã§ãã
å身㮠infra.controller_configuration
ã³ã¬ã¯ã·ã§ã³ã®é ããæ°ã«ãªã£ã¦ããã®ã§ãããAAP 2.5 ã®ã³ã³ãããã¼ã¹ã®ã¤ã³ã¹ãã¼ã©ã¼ã§ããäºå¾å¦çã¨ãã¦é¡ä¼¼ã®ä»çµã¿ã«ãã£ã¦è¨å®æå
¥ã§ããããã«ãªã£ãï¼Technical Preview ã¨ãã¦ã¯ AAP 2.4 ããï¼ã®ã§ããã®æ©ä¼ã«è©¦ãã¦ã¿ããã¨ã«ãã¾ããã使ã£ã¦ã¿ãã¨ãããã¨ããã«å±ãã¨ããããã£ã¦ä¾¿å©ã§ããã
ãã®è¨äºã§ã¯ãinfra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã®æ¦è¦ããå¬ããç¹ããããã¦ã¿ããã¨ãçæç¹ãªã©ãã¾ã¨ãã¾ãã
æ¤è¨¼ç°å¢:
infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ 3.1.0ansible.controller
ã³ã¬ã¯ã·ã§ã³ 4.6.2- ansible-core 2.17.7
- AAP 2.5 (Automation Controller 4.6.2)
- ã¯ããã«
- â infra.aap_configuration ã³ã¬ã¯ã·ã§ã³ã®æ¦è¦
- â ããããç¹
- ããããç¹1: dispatch ãã¼ã«ã«ãã宣è¨çãªæå®
- ããããç¹2: ã³ã¬ã¯ã·ã§ã³ã« Playbook ãå«ã¾ãã¦ãã
- ããããç¹3: ããã©ã«ãå¤ã«æ»ãã®ãã©ã¯
- ããããç¹4: 横æçãªå ±éè¨å®ãã©ã¯
- ããããç¹5: AAP 2.5 äºå¾è¨å®ã®ä»çµã¿ã«æµç¨ãããã
- â ãããã
- â çæç¹
- â ãããã«
â infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã®æ¦è¦
infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã¯ãAAP å
ã®ãããã¯ãã®è¨å®ã Ansible ãã便å©ã«è¨å®ããããã®ã³ã¬ã¯ã·ã§ã³ã§ãã
ãã¨ãã°ãAutomation Controller ä¸ã®ããã¸ã§ã¯ããã¤ã³ãã³ããªãèªè¨¼æ å ±ããã³ãã¬ã¼ããªã©ã®è¨å®ãèªååã§ãã¾ããåºæ¬çã«ã¯ãåãªãã¸ã§ã¯ã種å¥ãã¨ã«ãã¼ã«ã£ã¦ãéåæã§è¨å®éå§ãå¾ æ©ãã¨ããå¦çããªããã¾ãã
åºæ¬çãªæ
å ±ã¯ README.md ã«æ²è¼ããã¦ãã¾ãããã以å¤ã«ããããã docs
ãã£ã¬ã¯ããªã«ä»ã®ããã¥ã¡ã³ããããã®ã§ãAnsible Galaxy ã®ãã¼ã¸ãããããªãã¸ããªãç´æ¥è¦ãã»ããæ
å ±ãå¾ãããããããã¾ããã
ãªããinfra.aap_configuration
ã³ã¬ã¯ã·ã§ã³èªä½ã«ã¯ã¢ã¸ã¥ã¼ã«ã¯å«ã¾ãã¦ãããããã¼ã«ãã¡ã¤ã³ã§ãããã¼ã«ããansible.controller
ã³ã¬ã¯ã·ã§ã³ã®ãããªè¨å®ã¢ã¸ã¥ã¼ã«ãå«ã¾ããã³ã¬ã¯ã·ã§ã³ãå©ç¨ããããã¡ã«ãªã£ã¦ãã¾ãããã®ãããinfra.aap_configuration
ã³ã¬ã¯ã·ã§ã³åä½ã§ã¯åä½ãããã¢ã¸ã¥ã¼ã«ãå«ã¾ããã³ã¬ã¯ã·ã§ã³ããããã¦ã¤ã³ã¹ãã¼ã«ããå¿
è¦ãããã¾ãã
AAP å
ã® åãããã¯ãã¨infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³å
ã®ãã¼ã«ãå©ç¨ï¼ä¾åï¼ããã³ã¬ã¯ã·ã§ã³ã¯ä»¥ä¸ã®ã¨ããã§ãã
ãããã¯ã | ã³ã¬ã¯ã·ã§ã³å |
---|---|
Automation Gateway ï¼æ§è³ªä¸ã AAP å ¨è¬çãªä½ç½®ã¥ãï¼ | ansible.platform |
Automation Controller | ansible.contoller |
Automation Hub | ansible.hub |
Event Driven Ansible | `ansible.eda |
ã³ã¬ã¯ã·ã§ã³çµ±åã®çµç·¯
AAP 2.4 ã¾ã§ã¯ Automation Controller åãã® infra.controller_configuration
ãAutomation Hub åãã® infra.ah_configuration
ãã®ããã« AAP å
ã®åãããã¯ããã¨ã«ã³ã¬ã¯ã·ã§ã³ãå¥ãã¦ãã¾ããã
AAP 2.5 対å¿æã«ãæ¬è¨äºã§ç´¹ä»ãã infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ ã«çµ±åããã¾ããããã¼ã¸ã§ã³ã¨ãã¦ã¯ 3.0.0 ã¨ãã¦çµ±åããã¾ãããçµ±ååã¨çµ±åå¾ã§ã¯å
±éã®ä»æ§ãå¤ãããã¾ãã
å¨è¾ºã³ã¬ã¯ã·ã§ã³ã®ã¾ã¨ã
infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ ã¯ãå®éã«è¨å®ãæ
å½ãã ansible.controller
ã³ã¬ã¯ã·ã§ã³å
ã®ã¢ã¸ã¥ã¼ã«ãå©ç¨ãã¾ããã¾ããAAP 2.4 以ååãã« infra.controller_configuration
ã¨ããå身ã®ã³ã¬ã¯ã·ã§ã³ãããã¾ãã
ãã®ãããã®äºæ ãã¾ã¨ããã¨ä»¥ä¸ã®å³ã®ããã«ãªãã¾ãã
以ä¸ãè£è¶³ã§ãã
- å¿ç¨ã³ã¬ã¯ã·ã§ã³ãåºæ¬ã³ã¬ã¯ã·ã§ã³ã¨ããå¼ã³æ¹ã¯ãã®è¨äºåºæã§æ£å¼ãªãã®ã§ã¯ããã¾ãã
- å³ãã·ã³ãã«ã«ä¿ã¤ããã
dispatch
ãã¼ã«ããupstream ï¼AWX ãªã©ï¼é¢é£ã¯çç¥ãã¾ãã - æä½ã®ç¢å°ããåã³ã¬ã¯ã·ã§ã³ããåãããã¯ãã«ä¼¸ã³ã¦ãã¾ãããAPI ãªã¯ã¨ã¹ãã®è¦ç¹ã§ã¯ AAP 2.5 ã®å ´å㯠Automation Gateway çµç± ã§ã
â ããããç¹
è¨å®ã¢ã¸ã¥ã¼ã« ansible.controller
ãç´æ¥ä½¿ã£ã¦ãè¨å®ã®èªååã¯ã§ãã¾ãããinfra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ãå©ç¨ããã¨ãããããç¹ãããã¤ãããã¾ãã
ç§ãæããããããç¹ãã¾ã¨ãã¾ããããã¤ãã¯å¾è¿°ã®ãµã³ãã« Playbook ã§ã触ãã¾ãã
ããããç¹1: dispatch
ãã¼ã«ã«ãã宣è¨çãªæå®
ãããå人çã«ä¸çªããããç¹ã§ãã
Ansible 㯠Playbook åä½ã§ã¿ãã¨æç¶ããã¼ã¹ãªã®ã§ãPlaybook ãæ¸ãå´ãè¨å®ã®é çªãæèããå¿ è¦ãããã¾ãããã®ç¹ããæè»ã§ä¾¿å©ã ã£ãããé¢åã ã£ããã両é¢ãããã¾ãã
Automation Controller ã§ããã°ãã¸ã§ããã³ãã¬ã¼ããä½æããåã«ãé¢é£ããããã¸ã§ã¯ããã¤ã³ãã³ããªãä½æãã¦ããå¿
è¦ãããã¾ããinfra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã¨ãã¦ã¯ãcontroller_job_templates
ãã¼ã«ã§ã¸ã§ããã³ãã¬ã¼ããä½æããåã«ãcontroller_projects
ã controller_inventories
ãã¼ã«ã§ããã¸ã§ã¯ããã¤ã³ãã³ããªãªã©ãä½æããå¿
è¦ãããã¾ãã
ããã§ä¾¿å©ãªã®ããé çªãæèããªãã¦ããï¼ããã§ã¯å®£è¨çã¨è¡¨ç¾ãã¾ãï¼ infra.aap_configuration.dispatch
ãã¼ã«ã§ãã
infra.aap_configuration.dispatch
ãã¼ã«å©ç¨ããå ´åããã 決ãããããã©ã¼ãããã®è¨å®ç¨ã®å¤æ°ãã¡ã¤ã«ãç¨æãã¦ããã°è¯ãã¦ãå®éã«ã©ãããé çªã§å¦çããã㯠infra.aap_configuration.dispatch
ãã¼ã«å
é¨ã§é¢åãè¦ã¦ããã¦ãã¾ãï¼ããããä½ææãåæï¼ãè¨å®ç¨ã®å¤æ°ãã¡ã¤ã«å
ã®å®ç¾©é ã¯ã¸ã§ããã³ãã¬ã¼ããå
ã§ãåé¡ããã¾ããã
ä»çµã¿ã¨ãã¦ã¯ãããããã dispatch
ãã¼ã«å
ã§ç¶ãã¹ãé çªãå®ç¾©ããã¦ããã ãã§ãããã¨ãã°ãã¸ã§ããã³ãã¬ã¼ããè¨å®ãã controller_job_templates
ãã¼ã«ãããåã« controller_projects
ã controller_inventories
ãã¼ã«ãå¼ã°ããããã«ãªã£ã¦ãã¾ãã
è¨å®ç¨ã®å¤æ°ãã¡ã¤ã«ã¯è¤æ°ã«åãã¦ãããã¾ã¨ãã¦èªã¿è¾¼ã¿ããï¼ä¾ãã° ansible.builtin.include_vars
ã¢ã¸ã¥ã¼ã«ã® dir
ãªãã·ã§ã³ã host_vars/ãã¹ãå/*.yml
ï¼ã¨ãã«ãã宣è¨çãªæ§è³ªãæ´»ãã¦ãããã§ãã
dispatch
ãã¼ã«ã«ã¤ãã¦ã¯ãæ¬è¨äºã®ãã¨ã§è©¦ãã¾ãã
ããããç¹2: ã³ã¬ã¯ã·ã§ã³ã« Playbook ãå«ã¾ãã¦ãã
Ansible ã®ã³ã¬ã¯ã·ã§ã³ã¯ä»æ§ä¸ãã¢ã¸ã¥ã¼ã«ããã©ã°ã¤ã³ã ãã§ãªã Playbook ãå«ãããã¨ãã§ãã¾ãã
infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã«ãããã¤ã Playbook ãå«ã¾ãã¦ãã¾ããç¹ã« configure_aap.yml ã¨ãã Playbook ã便å©ã§ãã
configure_aap.yml
ã«ã¯ãè¨å®ç¨å¤æ°ãã¡ã¤ã«ãèªã¿è¾¼ãã¿ã¹ã¯ã¨ãå
è¿°ã® dispatch
ãã¼ã«ãå¼ã¶ã¿ã¹ã¯ãããã¾ãã
ã¤ã¾ããä¸çªæ¥½ã§ãããã¿ã¼ã³ã¯ãå¤æ°ãã¡ã¤ã«ã ãç¨æãã¦ãPlaybook ãæ¸ããã以ä¸ãå®è¡ããã ãã§ãã
ansible-playbook -i localhost, infra.aap_configuration.configure_aap
ï¼infra.aap_configuration.configure_aap
㯠configure_aap.yml
ã® FQCN 表è¨ã§ãï¼
ç§ã¯ãããã§æ¸ããªãããã§æ¸ã¾ããããã¨ããæ°æã¡ãè½çãã¾ããã
ã³ã¬ã¯ã·ã§ã³å
ã® configure_aap.yml
ã¨ãã Playbook ã«ã¤ãã¦ã¯ãæ¬è¨äºã®ãã¨ã§è©¦ãã¾ãã
ããããç¹3: ããã©ã«ãå¤ã«æ»ãã®ãã©ã¯
Ansible ã使ã£ã¦èªååããã¨ããã¸ã¥ã¼ã«ã®ãªãã·ã§ã³ã§å¤ãæå®ããã¨è¨å®ãå ¥ããã©ãè¨å®ãå ¥ã£ã¦ããç¶æ ã§å¯¾å¿ãããªãã·ã§ã³ãæå®ããªã㧠Playbook ãå®è¡ããã¨ãè¨å®ãæ®ã£ãã¾ã¾ã«ãªãã±ã¼ã¹ãå¤ãå°è±¡ãããã¾ããã¤ã¾ããã¼ã¸çã REST API ã«ä¾ãã㨠PATCH çãªåä½ã§ãããã®åä½ããããããã¨ããããã°ãããã©ã«ãå¤ï¼æªè¨å®ãªã©ï¼ã«æ»ã£ã¦ã»ãããªã¨æãã¨ããããã¾ãã
infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã§ã¯ãã©ã¡ãã®åä½ã«ãããé¸æã§ãã¾ããããã©ã«ãã¯ãã¼ã¸/PATCHçãªåä½ã§ãã
ãã¨ãã°ãAutomation Controller ã®ããã¸ã§ã¯ãã®è¨å®ã§ãã説æãã«è©²å½ããè¨å®ãè¨å®ããªãã£ãå ´åãä½ãããªãåä½ï¼ãã¼ã¸/PATCHçï¼ã«ãã§ããããããã©ã«ãã®æªè¨å®ãå¼·å¶ããåä½ï¼PUTçï¼ã«ãã§ãã¾ãã
infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã§ã¯ãããã©ã«ãå¤ãå¼·å¶ããåä½ã®ãã¨ããEnforcing defaults
ã¨å¼ãã§ããããã§ãï¼ä¾ï¼ã
ããããç¹4: 横æçãªå ±éè¨å®ãã©ã¯
åè¿°ã® Enforcing defaults
ã®åä½ã«ãããã©ããããå®è¡ãã°ä¸ã®ãã¹ã¯ã¼ãé¡ãé ããã©ããããªã©ã®è¨å®ãããã¼ã«ãã¨ã ãã§ãªãã横æçï¼ã°ãã¼ãã«ï¼ã«ãæå®ã§ãã¾ãã
ä»ã«ããåãªãã¸ã§ã¯ãã® state
ã platform_state
ã¨ããå¤æ°ã§ãå
¨ãã¼ã«ï¼å
¨ãªãã¸ã§ã¯ãï¼ã¾ã¨ãã¦æå®ã§ãã¾ãï¼ãã¼ã«ãã¨ã®æå®ãããå ´åã¯ãã¡ããåªå
ï¼ã
ããããç¹5: AAP 2.5 äºå¾è¨å®ã®ä»çµã¿ã«æµç¨ãããã
ãã¯ããã«ãã§ãå°ã触ãã¾ããããã³ã³ãããã¼ã¹ã® AAP 2.5 ã®ã¤ã³ã¹ãã¼ã©ã¼ã®äºå¾å¦çï¼post installï¼ã§ãè¨å®æå ¥ã§ããããã«ãªã£ã¦ãã¾ãã
ãã®ä»çµã¿ã¨ã㦠infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã®å身ï¼çµ±ååï¼ã§ãããinfra.controller_configuration
ã infra.ah_configuration
ã³ã¬ã¯ã·ã§ã³ãå©ç¨ããã¾ãï¼ããã¾ã§ç¾æç¹ããã®ãã¡ infra.aap_configuration
ã«ãªãããããã¾ããï¼ã
ãã®ãããè¨å®ã®å¤æ°å®ç¾©ãã¡ã¤ã«ãæµç¨ããããã§ããæ¬è¨äºã§ã¯ãAutomation Gateway ã¸ã®èªè¨¼æ å ±ãå¤æ°ã§å®ç¾©ãã¦ãã¾ãããAAP 2.5 ã®ã¤ã³ã¹ãã¼ã©ã¼ã®äºå¾å¦çã§è¨å®ãæµãè¾¼ãå ´åã¯ãèªè¨¼æ å ±ã®å®ç¾©ã¯ä¸è¦ã§ãï¼ã¤ã³ã¹ãã¼ã©ã¼ã® inventory ã«å®ç¾©æ¸ã¿ã®ããï¼ã
ãªããã³ã¬ã¯ã·ã§ã³ã®çµ±åæã«ããã¼ã«ãå©ç¨ããå¤æ°åãå¤ãã£ã¦ãããã®ãããã¾ãã詳細ã¯ä»¥ä¸ã®ããã¥ã¡ã³ããåç §ãã¦ãã ããã
infra.aap_configuration/CONVERSION_GUIDE.md at devel · redhat-cop/infra.aap_configuration · GitHub
â ãããã
ããã¤ãã®ãã¿ã¼ã³ã§ãããã¾ãã
ä»åã¯ãä¸çªé¦´æã®ãã Automation Controller ã¸ã®è¨å®ãä¾ã«ãã¾ãã
1å°ï¼ã¨ããã1ã»ããï¼ã®ã¿ã対象ã¨ããã®ã§ãã¤ã³ãã³ããªãã¡ã¤ã«ãä½æããã対象ãã¹ã㯠localhost
ã®ã¿ã«ãã¾ãã
æºå: ã³ã¬ã¯ã·ã§ã³ã®ã¤ã³ã¹ãã¼ã«
ã¾ãç°å¢ã®æºåã¨ãã¦ä»¥ä¸ã®ã³ã¬ã¯ã·ã§ã³ãã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã
infra.aap_configuration
ansible.controller
ã¤ã³ã¹ãã¼ã«ã³ãã³ã:
ansible-galaxy collection install infra.aap_configuration ansible-galaxy collection install ansible.controller
ä»å㯠Automation Controller ã¸ã®è¨å®ã®ã¿è¡ãã®ã§ãinfra.aap_configuration
以å¤ã«å¿
è¦ãªã®ã¯ ansible.controller
ã®ã¿ã§ããããã Automation Gateway ã®è¨å®ããããªã ansible.platform
ãEDA ãªã ansible.eda
ãAutomation Hub ãªã ansible.hub
ãã¤ã³ã¹ãã¼ã«ããå¿
è¦ãããã¾ãï¼åèï¼ã
ãªããansible.controller
ã ansible.platform
ãansible.eda
ãansible.hub
ã³ã¬ã¯ã·ã§ã³ã¯ãAnsible Galaxy ã«ããã¾ãããansible-galaxy collection install
ã³ãã³ãã§ã¤ã³ã¿ã¼ãããçµç±ã§ã¤ã³ã¹ãã¼ã«ããå ´åã¯ãRed Hat 社ããã¹ããã Automation Hub ãåç
§ããããã«è¨å®ãã¦ããå¿
è¦ãããã¾ãï¼åèï¼ã
ï¼è£è¶³ï¼AWX ã¸ã®å¯¾å¿ã«ã¤ãã¦
infra.aap_configuration
ã¯ããã¥ã¡ã³ãä¸ãå
é¨çã«å©ç¨ããã³ã¬ã¯ã·ã§ã³ã¨ã㦠ansible.controller
㨠awx.awx
ã³ã¬ã¯ã·ã§ã³ã®ä¸¡æ¹ã«å¯¾å¿ãã¦ããæ¨ã®è¨è¿°ãããã¾ããããããããã¯å身㮠infra_controller_configuration
ã³ã¬ã¯ã·ã§ã³ã®åæ®ã§ã¯ãªããã¨æãã¾ãã
infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã¯ã Automation Gateway ãå°å
¥ããã AAP 2.5 以ä¸åãã¨æè¨ï¼ãªãã¸ããªã®èª¬æãªã©ã«ï¼ããã¦ããããã®é¢ã§ã AWX ã¨ã¢ã¼ããã¯ãã£ã¼ãç°ãªãã¾ããinfra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã§ AWX ã«å¯¾ããè¨å®ã¯è©¦ãã¦ãã¾ãããããããããã¾ããããªãã¨ãããåºã¦ããã¨æãã¾ãã
ã¡ãªã¿ã«ã試ããéãansible.controller
㨠awx.awx
ã³ã¬ã¯ã·ã§ã³ã®ä¸¡æ¹ãã¤ã³ã¹ãã¼ã«ããã¦ããå ´åãansible.controller
ãåªå
ãããããã§ããã
ãããã1: ãªãã¸ã§ã¯ãåå¥ã®ãã¼ã«ãå¼ã¶
ã¾ãä¸çªåç´ãªä»¥ä¸ã®ãã¿ã¼ã³ã§ãã
- Playbook: èªåã§æ¸ã
- ãã¼ã«:
controller_projects
ãªã©ã®ãªãã¸ã§ã¯ãåå¥ãã¼ã«ãå©ç¨ - è¨å®ã®å¤æ°å®ç¾©ãã¡ã¤ã«: èªåã§æ¸ã
ããããªè¨å®ãã§ãã¾ãããåºæ¬ã¨ãããã Automation Controller ã®ä»¥ä¸ã®ãªãã¸ã§ã¯ããä½ãã¾ãã
対象ãªãã¸ã§ã¯ã | å©ç¨ãã¼ã« |
---|---|
ããã¸ã§ã¯ã | controller_projects |
ã¤ã³ãã³ã㪠| controller_inventories |
èªè¨¼æ å ± | controller_credentials |
ã¸ã§ããã³ãã¬ã¼ã | controller_job_templates |
å¤æ°å®ç¾©ãã¡ã¤ã«ã®æºå
èªè¨¼æ å ±ã®å®ç¾©
ã¾ããAPI ãªã¯ã¨ã¹ãããéã®ããªã¯ã¨ã¹ãå ãèªè¨¼æ å ±ã®æå®ããã¾ãã
AAP 2.5 ã§ã¯ãAutomation Gateway ãéãã API ãªã¯ã¨ã¹ããåºæ¬ã§ãããã®ããããªã¯ã¨ã¹ãå ãèªè¨¼æ å ±ã¯ Automation Controller ã§ã¯ãªããAutomation Gateway ã®ãã®ãæå®ãã¾ããå¤æ°åã¯ããã¥ã¡ã³ãã«ãè¨è¼ãããã¾ãã
configs/auth.yml
:
--- aap_hostname: 192.168.1.100 # Automation Gateway ã®æ¥ç¶å aap_token: XXXXXXXXXXXXXXXXXX # Automation Gateway ã® API ãã¼ã¯ã³ãå®é㯠ansible-vault ã§æå·åãã¦ãããªã© aap_validate_certs: false # 以ä¸ã¯è¨å®ã¨ã¯ç´æ¥ã¯é¢ä¿ããã¾ããããPython ã¤ã³ã¿ã¼ããªã¿ã¼æ±ºå®æã®è¦åãåºããªãããã«ãããã ansible_python_interpreter: "{{ ansible_playbook_python }}"
aap_token
ã§ãã¼ã¯ã³ã§æå®ããå ´åã¯ãäºããã¼ã¯ã³ãä½æï¼ä¾ Automation Gateway ã«ãã°ã¤ã³ > Access Management > ã¦ã¼ã¶ã¼ > [ã¦ã¼ã¶ã¼å] > Token ï¼ãã¦ããã¾ãã
ãããã¦ã¼ã¶ã¼åã¨ãã¹ã¯ã¼ãã®çµã¿åãããå©ç¨ããå ´åã¯ãå¤æ° aap_username
ãaap_password
ã§æå®ãã¾ãã ã¦ã¼ã¶ã¼åã¨ãã¹ã¯ã¼ãã®çµã¿åããã ã¨ãå
é¨çã«é½åº¦ãã¼ã¯ã³ãä½æãåé¤ãç¹°ãè¿ãã¾ãã
ãªã¯ã¨ã¹ãæ°ãå°ãªãããããªã©ã®å ´åã¯ããã¼ã¯ã³ãããã¨æãã¾ãã¾ãããªãã 2024/12/17 ç¾å¨
ãªãã¸ããªãããã® README.mdã«ã¯ãcontroller_oauthtoken
ã¨ããå¤æ°åãããã¾ããã誤ãã®ããã§ãï¼ããããå身ã³ã¬ã¯ã·ã§ã³ã®åæ®ï¼ãæ£ããã¯åãã¼ã«ã® README.md
ã«ãããéã aap_token
ã®ã¯ãã§ããï¼ä¿®æ£PRã¯æåºæ¸ã¿ï¼ã
è¨å®å¤ã®å®ç¾©
次ã«ãåãªãã¸ã§ã¯ãã«å¯¾ããè¨å®å¤ããå¤æ°å®ç¾©ãã¡ã¤ã«ã¨ãã¦å®ç¾©ãã¾ããããã§ã¯è¨å®å¤ã 1ã¤ã®ãã¡ã¤ã«ã«ã¾ã¨ãã¾ããããã¨ãã°ãªãã¸ã§ã¯ã種å¥ãã¨ã«ãã¡ã¤ã«ãåãã¦ããã¾ã¨ãã¦èªã¿è¾¼ãã°OKã§ãã
è¨å®å¤æ°ã®ãã©ã¼ãããã®è©³ç´°ã¯åãã¼ã«ã® README.md
ãåç
§ãã¦ãã ãï¼controller_projects
ã§ããã° roles/controller_projects/README.md
ï¼ã
configs/controller_config.yml
:
--- # Automation Controller ã®è¨å®ã®å¤æ°å®ç¾©ãã¡ã¤ã« # ããã®å®ç¾©é ã¯ä¾åæ§ãæèããªãã¦ãã controller_inventories: - name: test_inventory organization: Default description: hogehoge controller_hosts: - name: test_host01 inventory: test_inventory enabled: true variables: ansible_host: 192.168.1.201 controller_groups: - name: servers inventory: test_inventory hosts: - test_host01 controller_credentials: - name: test_credential credential_type: Machine organization: Default inputs: username: myuser password: dummy_password # å®é㯠ansible-vault ã§æå·åãã¦ãããªã© controller_projects: - name: test_project organization: Default scm_type: git scm_url: https://github.com/ansible/ansible-tower-samples scm_branch: master scm_update_on_launch: true controller_templates: - name: test_job_template inventory: test_inventory project: test_project playbook: hello_world.yml
ï¼è£è¶³1ï¼ aap_hostname
ã« Automation Gateway ã®ã¢ãã¬ã¹ãæå®ããçç±
ansible.controller
ã³ã¬ã¯ã·ã§ã³ã¯ããã¼ã¸ã§ã³4.6.0
ããAPI ãªã¯ã¨ã¹ãã®ãã¼ã¹ã®ã以ä¸ã®ããã«å¤ããã¾ããã
- 4.5 ã¾ã§
https://ã¢ãã¬ã¹/api/
- 4.6.0 ãã
https://ã¢ãã¬ã¹/controller/api/
ããã¯ããã¼ã¸ã§ã³ 4.6.0
ãã AAP 2.5 åããã¤ã¾ã Automation Gateway çµç±ãåæã ãããã¨ãããã¨ã®ããã§ãã
https://Automation Gateway ã®ã¢ãã¬ã¹/controller/api/
ããªã¯ã¨ã¹ããããã¨ã«ãã£ã¦ãæçµçã«ã¯ Automation Controller ã® /controller/api/
ã«ãªã¯ã¨ã¹ãã§ãã¾ãããªãã¤ã¬ã¯ããããããã§ã¯ãªããééçã«å¦çãããã®ã§ãAPI ã¯ã©ã¤ã¢ã³ãããæèãã¾ããã
aap_hostname
ã« Automation Gateway ã®ã¢ãã¬ã¹ãæå®ãã¦ã Automation Controller ãæä½ã§ããã®ã¯ãã®ãããªä»çµã¿ã®ããã§ãã
å³å¯ã«ã¯ãhttps://Automation Controller ã®ã¢ãã¬ã¹/controller/api/
ã®ããã« Automation Controller ãç´æ¥æå®ãã¦ã Automation Controller ãæä½ã§ãã¾ãããinfra.aap_configuration
ã Automation Controller 以å¤ã® AAP ã®ãããã¯ããæ±ããã¨ãèæ
®ããã¨ããã¯ã aap_hostname
㯠Automation Gateway ã®ã¢ãã¬ã¹ãæå®ããã®ã妥å½ã§ãããã
åè: Automation Gateway 㨠Automation Controller 㨠API ã®é¢ä¿
ï¼è£è¶³2ï¼å種å¤æ°å®ç¾©ã®æ¹æ³ã«ã¤ãã¦
ä»åã¯ãèªè¨¼æ å ±ã¨è¨å®ã®å¤æ°å®ç¾©ãã¡ã¤ã«ãããã¥ã¡ã³ãã®æ¹æ³ã«å¯ãã¦ãç¬ç«ããå¤æ°å®ç¾©ãã¡ã¤ã«ãä½æãã¾ããã
æ®éã®å¤æ°ã®èªã¿è¾¼ã¿ã®ä»çµã¿ã使ã£ã¦ããã ããªã®ã§ã以ä¸ã®ãããªå®ç¾©ãèªã¿è¾¼ã¿æ¹æ³ãå¯è½ã§ãã
- ã¤ã³ãã³ããªå¤æ°ã¨ãã¦å®ç¾©ãã
- ä»»æã®ãã¡ã¤ã«åãä»»æã®åä½ã§åå²ãã¦ããã£ã¬ã¯ããªä¸¸ãã¨å¤æ°ãèªã¿è¾¼ã
- éã«ãèªè¨¼æ å ±ã¨è¨å®ã®å¤æ°å®ç¾©ãã¡ã¤ã«ã1ã¤ã«ã¾ã¨ãã
ï¼è£è¶³3ï¼å¤æ°å®ç¾©ãã¡ã¤ã«ã®ãã©ã¼ãããã¨ã¨ã¯ã¹ãã¼ãã«ã¤ãã¦
utomation Controller ã®åãªãã¸ã§ã¯ãã®è¨å®å¤æ°ã®ãã©ã¼ãããã¯ãawx
ã³ãã³ãï¼awxkit
ï¼ã® export
æ©è½ã§åºåãããã©ã¼ããããåèã«ãªãããã§ãããã awx export
ããå ´åã¯ãæ¥ç¶å¯¾è±¡ã Automation Gateway ã§ã¯ãªã Automation Controller ç´ã®ã¢ãã¬ã¹ãèªè¨¼æ
å ±ã«ããå¿
è¦ãããã¾ããAutomation Gateway çµç±ã ã¨ãAPI ã¨ã³ããã¤ã³ãã®ãã¹ã®æ´åæ§ããªãããã§ãï¼å°ãªãã¨ãããã©ã«ãã®å ´åï¼ã
ã¨ã¯ã¹ãã¼ãã®æ å ±ã¯ä»¥ä¸ã®ããã¥ã¡ã³ããåç §ãã¦ãã ããã
infra.aap_configuration/EXPORT_README.md at devel · redhat-cop/infra.aap_configuration · GitHub
Playbook ã®æºå
ç¶ã㦠Playbook ã®æºåã§ããå¤æ°ãã¡ã¤ã«ãèªã¿è¾¼ã¿ãåãªãã¸ã§ã¯ãã«å¿ãããã¼ã«ãå¼ã³ã¾ãã
configure.yml
:
--- - name: Configure AAP by each roles hosts: localhost gather_facts: false connection: local tasks: # å¤æ°ãã¡ã¤ã«ããã£ã¬ã¯ããªä¸¸ãã¨èªã¿è¾¼ã - name: Include vars ansible.builtin.include_vars: dir: ./configs extensions: - yml # åãªãã¸ã§ã¯ãã«å¯¾å¿ãããã¼ã«ãä¾åæ§ãæèããé çªã§å¼ã³ã ã - name: Import infra.aap_configuration.controller_inventories ansible.builtin.import_role: name: infra.aap_configuration.controller_inventories - name: Import infra.aap_configuration.controller_hosts ansible.builtin.import_role: name: infra.aap_configuration.controller_hosts - name: Import infra.aap_configuration.controller_host_groups ansible.builtin.import_role: name: infra.aap_configuration.controller_host_groups - name: Import infra.aap_configuration.controller_credentials ansible.builtin.import_role: name: infra.aap_configuration.controller_credentials - name: Import infra.aap_configuration.controller_projects ansible.builtin.import_role: name: infra.aap_configuration.controller_projects - name: Import infra.aap_configuration.controller_job_templates ansible.builtin.import_role: name: infra.aap_configuration.controller_job_templates
ããã¾ã§ã®ä½æ¥ã§ããã¡ã¤ã«ããã£ã¬ã¯ããªæ§é ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã
âââ configs â âââ auth.yml â âââ controller_config.yml âââ configure.yml
å®è¡
å ã»ã©èªåã§ä½æãã Playbook ãå®è¡ãã¾ãã
ansible-playbook -i localhost, configure.yml
å®è¡ãã°ï¼ã¯ãªãã¯ãã¦éãï¼:
$ ansible-playbook -i localhost, configure.yml PLAY [Configre AAP by each roles] *************************************************************************************** TASK [Include vars] ***************************************************************************************************** ok: [localhost] TASK [infra.aap_configuration.meta_dependency_check : Print dependency check status] ************************************ ok: [localhost] => { "msg": "Dependency check is deactivated. Required collections presence will not be verified. This might cause failure in the next tasks." } TASK [infra.aap_configuration.meta_dependency_check : Check awx.awx is installed] *************************************** skipping: [localhost] TASK [infra.aap_configuration.meta_dependency_check : Check ansible.controller is installed] **************************** skipping: [localhost] TASK [infra.aap_configuration.meta_dependency_check : Ensure one is installed] ****************************************** skipping: [localhost] TASK [infra.aap_configuration.controller_inventories : Validating arguments against arg spec 'main' - An Ansible Role to create inventories on Ansible Controller.] *** ok: [localhost] TASK [infra.aap_configuration.controller_inventories : Managing Inventories] ******************************************** ok: [localhost] => (item=Create/Update inventory test_inventory) TASK [infra.aap_configuration.controller_inventories : Flag for errors (check mode only)] ******************************* skipping: [localhost] TASK [infra.aap_configuration.controller_inventories : Managing Controller Inventories | Wait for finish the inventories management] *** FAILED - RETRYING: [localhost]: Managing Controller Inventories | Wait for finish the inventories management (30 retries left). changed: [localhost] => (item=Create/Update Controller inventory test_inventory | Wait for finish the inventories creation) TASK [infra.aap_configuration.controller_hosts : Validating arguments against arg spec 'main' - An Ansible Role to create hosts on Ansible Controller.] *** ok: [localhost] TASK [infra.aap_configuration.controller_hosts : Managing Controller Hosts] ********************************************* ok: [localhost] => (item=Create/Update Controller host test_host01) TASK [infra.aap_configuration.controller_hosts : Flag for errors (check mode only)] ************************************* skipping: [localhost] TASK [infra.aap_configuration.controller_hosts : Managing Controller Hosts | Wait for finish the Hosts management] ****** FAILED - RETRYING: [localhost]: Managing Controller Hosts | Wait for finish the Hosts management (30 retries left). changed: [localhost] => (item=Create/Update Controller Host test_host01 | Wait for finish the Hosts creation) TASK [infra.aap_configuration.controller_host_groups : Validating arguments against arg spec 'main' - An Ansible Role to create groups on Ansible Controller.] *** ok: [localhost] TASK [infra.aap_configuration.controller_host_groups : Managing Controller Groups] ************************************** ok: [localhost] => (item=Create/Update Controller Group servers) TASK [infra.aap_configuration.controller_host_groups : Flag for errors (check mode only)] ******************************* skipping: [localhost] TASK [infra.aap_configuration.controller_host_groups : Managing Controller Groups | Wait for finish the Controller Groups management] *** FAILED - RETRYING: [localhost]: Managing Controller Groups | Wait for finish the Controller Groups management (30 retries left). changed: [localhost] => (item=Create/Update Controller Group servers | Wait for finish the Controller Group creation) TASK [infra.aap_configuration.controller_credentials : Validating arguments against arg spec 'main' - An Ansible Role to create credentials on Ansible Controller.] *** ok: [localhost] TASK [infra.aap_configuration.controller_credentials : Managing Credentials] ******************************************** ok: [localhost] => (item=None) ok: [localhost] TASK [infra.aap_configuration.controller_credentials : Flag for errors (check mode only)] ******************************* skipping: [localhost] TASK [infra.aap_configuration.controller_credentials : Managing Controller Credentials | Wait for finish the credential management] *** FAILED - RETRYING: [localhost]: Managing Controller Credentials | Wait for finish the credential management (30 retries left). changed: [localhost] => (item=None) changed: [localhost] TASK [infra.aap_configuration.controller_projects : Validating arguments against arg spec 'main' - An Ansible Role to create projects on Ansible Controller.] *** ok: [localhost] TASK [infra.aap_configuration.controller_projects : Managing Projects] ************************************************** ok: [localhost] => (item=Create/Update Project test_project) TASK [infra.aap_configuration.controller_projects : Flag for errors (check mode only)] ********************************** skipping: [localhost] TASK [infra.aap_configuration.controller_projects : Managing Projects | Wait for finish the projects management] ******** FAILED - RETRYING: [localhost]: Managing Projects | Wait for finish the projects management (30 retries left). FAILED - RETRYING: [localhost]: Managing Projects | Wait for finish the projects management (29 retries left). FAILED - RETRYING: [localhost]: Managing Projects | Wait for finish the projects management (28 retries left). FAILED - RETRYING: [localhost]: Managing Projects | Wait for finish the projects management (27 retries left). FAILED - RETRYING: [localhost]: Managing Projects | Wait for finish the projects management (26 retries left). FAILED - RETRYING: [localhost]: Managing Projects | Wait for finish the projects management (25 retries left). FAILED - RETRYING: [localhost]: Managing Projects | Wait for finish the projects management (24 retries left). changed: [localhost] => (item=Create/Update Project test_project | Wait for finish the project creation) TASK [infra.aap_configuration.controller_job_templates : Validating arguments against arg spec 'main' - An Ansible Role to create job templates on Ansible Controller.] *** ok: [localhost] TASK [infra.aap_configuration.controller_job_templates : Managing Controller Job Templates] ***************************** ok: [localhost] => (item=Create/Update Controller Job Template test_job_template) TASK [infra.aap_configuration.controller_job_templates : Flag for errors (check mode only)] ***************************** skipping: [localhost] TASK [infra.aap_configuration.controller_job_templates : Managing Job Templates | Wait for finish the Job Templates management] *** FAILED - RETRYING: [localhost]: Managing Job Templates | Wait for finish the Job Templates management (30 retries left). FAILED - RETRYING: [localhost]: Managing Job Templates | Wait for finish the Job Templates management (29 retries left). changed: [localhost] => (item=Create/Update Job Template {'failed': 0, 'started': 1, 'finished': 0, 'ansible_job_id': 'j639891192001.998282', 'results_file': '/home/yokochi/.ansible_async/j639891192001.998282', 'changed': False, '__controller_template_item': {'name': 'test_job_template', 'inventory': 'test_inventory', 'project': 'test_project', 'playbook': 'hello_world.yml', 'credentials': ['test_credential'], 'execution_environment': 'Default execution environment'}, 'ansible_loop_var': '__controller_template_item'} | Wait for finish the Job Template creation) PLAY RECAP ************************************************************************************************************** localhost : ok=20 changed=6 unreachable=0 failed=0 skipped=9 rescued=0 ignored=0
äºå¾ç¢ºèª
ç¡äºã«è¨å®ã§ãã¾ãããï¼ãããã Red Hat Developer Subscription for Individual æ´æ°ã®ææã§è¦åãã»ã»ï¼
ã¸ã§ããã³ãã¬ã¼ããå®è¡ã§ãã¾ããã
ãããã2: dispatch
ãã¼ã«ãå©ç¨
ç¶ãã¦ã®ãã¿ã¼ã³ã¯ããªãã¸ã§ã¯ãåå¥ã®ãã¼ã«ã§ã¯ãªããdispatch
ãã¼ã«ãå©ç¨ãããã¿ã¼ã³ã§ãã
- Playbook: èªåã§æ¸ã
- ãã¼ã«:
dispatch
ãã¼ã«ãå©ç¨ - è¨å®ã®å¤æ°å®ç¾©ãã¡ã¤ã«: èªåã§æ¸ã
æºå
å¤æ°å®ç¾©ãã¡ã¤ã«ã¯ããããã1 ã¨åããã®ãå©ç¨ãã¾ãã
Playbook ã¯ä»¥ä¸ã®ããã«ãdispatch
ãã¼ã«ãå©ç¨ãããã®ã«ãã¾ãã
--- - name: Configure AAP by dispatch role hosts: localhost gather_facts: false connection: local tasks: # å¤æ°ãã¡ã¤ã«ããã£ã¬ã¯ããªä¸¸ãã¨èªã¿è¾¼ã - name: Include vars ansible.builtin.include_vars: dir: ./configs extensions: - yml # dispatch ãã¼ã«ã§ä¸¸ãã¨è¨å® - name: Import infra.aap_configuration.dispatch ansible.builtin.import_role: name: infra.aap_configuration.dispatch
ãã¡ã¤ã«ããã£ã¬ã¯ããªæ§é ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã
âââ configs â âââ auth.yml â âââ controller_config.yml âââ dispatch.yml
å®è¡
å ã»ã©ä½æãã Playbook ãå®è¡ãã¾ãã
ansible-playbook -i localhost, dispatch.yml
ãã°ããã£ããã£ã¯çç¥ãã¾ãããç¡äºã«è¨å®ã§ãã¾ããã
ãããã3: ã³ã¬ã¯ã·ã§ã³å ã® Playbook ãå©ç¨ãã
3ã¤ãã®ãã¿ã¼ã³ã¯ãã³ã¬ã¯ã·ã§ã³ã«å«ã¾ãã Playbook ãå©ç¨ãããã¿ã¼ã³ã§ãã
- Playbook: ã³ã¬ã¯ã·ã§ã³ã«å«ã¾ãã
configure_aap.yml
ãå©ç¨ - ãã¼ã«:
dispatch
ãã¼ã«ãå©ç¨ï¼ä¸è¨ Playbook ã§å¼ã°ããï¼ - è¨å®ã®å¤æ°å®ç¾©ãã¡ã¤ã«: èªåã§æ¸ã
æºå
å¼ãç¶ããå¤æ°å®ç¾©ãã¡ã¤ã«ã¯åããã®ãå©ç¨ãã¾ããPlaybook ã¯ã³ã¬ã¯ã·ã§ã³ã«å«ã¾ãããã®ãå©ç¨ããã®ã§ä»ã«æºåã¯ããã¾ããã
ãã¡ã¤ã«ããã£ã¬ã¯ããªæ§é ã¯ä»¥ä¸ã®ããã«ãªãã¾ãã
âââ configs âââ auth.yml âââ controller_config.yml
å®è¡
ã³ã¬ã¯ã·ã§ã³å
ã«ãã Playbook configure_aap.yml
ãå®è¡ãã¾ãããã® Playbook ã¯ãå¤æ°å®ç¾©ãã¡ã¤ã«ã®èªã¿è¾¼ã¿ã¨ãdsipatch
ãã¼ã«ã®å¼ãã³ã ãããã¾ããã³ã¬ã¯ã·ã§ã³å
ã® Playbook ãå¼ã¶ããã« FQCN ã§æå®ããç¹ã¨ãå¤æ°å®ç¾©ãã¡ã¤ã«ããããã£ã¬ã¯ããªã®ãã¹ãå¤æ° aap_configs_dir
ã§æå®ããç¹ããã¤ã³ãã§ãã
ansible-playbook -i localhost, infra.aap_configuration.configure_aap -e aap_configs_dir=${PWD}/configs
å¤æ° aap_configs_dir
ã®äºæ
㯠configure_aap.yml
ã®ä»¥ä¸ã®ã¿ã¹ã¯ãè¦ãã¨åããã¾ãã
- name: Include vars from configs directory ansible.builtin.include_vars: dir: "{{ aap_configs_dir | default((lookup('env', 'AAP_CONFIGS_DIR') == '') | ternary('./configs', lookup('env', 'AAP_CONFIGS_DIR'))) }}" ignore_files: [controller_config.yml.template] extensions: [yml]
ç¸å¯¾ãã¹ã§æå®ããã¨ãPlaybook èµ·ç¹ï¼infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ã®ã¤ã³ã¹ãã¼ã«å
ã® playbooks
ãã£ã¬ã¯ããªï¼ã«ãªãã¾ããä»åã¯ãansible-playbook
ã³ãã³ãå®è¡ã®ã«ã¬ã³ããã£ã¬ã¯ããªé
ä¸ã® config
ãã£ã¬ã¯ããªãå©ç¨ãããã£ããããaap_configs_dir
ã®ãã¹ã¯ ${PWD}
ãè£å®ãã¦çµ¶å¯¾ãã¹ã«èª¿æ´ãã¦ãã¾ãã
ãã°ããã£ããã£ã¯çç¥ãã¾ãããç¡äºã«è¨å®ã§ãã¾ããã
â çæç¹
便å©ãªã³ã¬ã¯ã·ã§ã³ã§ã¯ããã¾ãããä»ã®ã¨ããæ°ã¥ãã¦ããèæ ®ç¹ã¨ãã¦ä»¥ä¸ã®ç¹ãæãããã¾ãã
ãããããä»åããããinfra.aap_configuration
ã³ã¬ã¯ã·ã§ã³ 3.1.0
æç¹ã§ãã
çæç¹1: ãã°ã®å ¥ãä½å°
ansible.controller
ãªã©ã®ã³ã¬ã¯ã·ã§ã³ããã¼ã«ã¨ãã¦æ½è±¡åãã¦ãã以ä¸ãã©ããã¦ããã°ãå
¥ãä½å°ãåºã¦ãã¦ãã¾ãã¾ãããã¨ãã°ãåè¿°ã® dispatch
ãã¼ã«ã¯ãcontroller_roles
ãã¼ã«ãå¼ã°ãªãã¨ããä¸å
·åãããã¾ãï¼3.1.0æç¹ããããã次ã®ãªãªã¼ã¹ã§ä¿®æ£äºå®ï¼ã
ãã ããã°ãããã¨ãã¦ããããªãã¯ãªãªãã¸ããªã§ç®¡çãã¡ã³ãããã¦ãããã¨ã¯æå³ããããã¨ã ã¨æã£ã¦ãã¾ãã
çæç¹2: ä¸é¨ããã¥ã¡ã³ãã®ä¸æ´å
ã¾ããå身㮠infra.controller_configuration
ã³ã¬ã¯ã·ã§ã³ããæµç¨ããå½±é¿ããã£ã¦ããå®è£
ã¨ããã¥ã¡ã³ãã®ä¸æ´åãä¸é¨æ®ã£ã¦ãã¾ãããã¨ãã°ããã¼ã«ã«æå®ããå¤æ°ã®ããã©ã«ãå¤ããåãã¼ã«ã® README.md
㨠defaults/main.yml
㨠meta/argument_specs.yml
ã®éã§æ´åæ§ããªããã¨ãããã¾ããããã©ã«ãå¤ã«ã¤ãã¦ã¯ãå®è£
ã§ãã defaults/main.yml
ã確èªãããã¨ããããããã¾ãã
ããã¥ã¡ã³ãä¸æ´åã typo çãªãã®ã¯ãæè¿ç§ãã¡ã¾ã¡ã¾ä¿®æ£ããã¦ãã¾ãã®ã§ãå°ããã¤æ¹åã§ããè¦è¾¼ã¿ã§ãã
çæç¹3: ãã¼åãééãã¦ãã¨ã©ã¼ã«ãªããªã
ansible.controller
ãªã©ã«ã«å«ã¾ããã¢ã¸ã¥ã¼ã«ãç´æ¥å©ç¨ããå ´åã¯ãã¢ã¸ã¥ã¼ã«ã®ãªãã·ã§ã³åã¯ã·ãã¢ã§ããåå¨ããªããªãã·ã§ã³åãæå®ãã㨠Unsupported ã§ããã¨ãã£ãã¨ã©ã¼ã«ãªãã¾ãã
ããã infra.aap_configuration
ã³ã¬ã¯ã·ã§ã³å
ã®ãã¼ã«ã«ä¸ããå¤æ°ã®ãã§ãã¯ã§ãã Role argument validation ã®å®ç¾©ã¯ãããã§ããä¾ãã°ã controller_hosts
ãã¼ã«ã®å ´åãå®ç¾©ãä¸é¨ã³ã¡ã³ãã¢ã¦ãã«ããã¦ãã¾ãã
ãã®ããããã¼åãééã£ã¦ãã¦ãããªãã¼ã·ã§ã³ã§ã¯ã¨ã©ã¼ã«ãªããæ°ãä»ããªãã±ã¼ã¹ããããã¾ããå©ç¨ããå´ã注æãæãå¿ è¦ãããã¾ãã
ãªããåãã¼ã«ãå©ç¨ããå¤æ°å®ç¾©ãã¡ã¤ã«ã¯ãããã¾ã§ãã ã®å¤æ°å®ç¾©ãã¡ã¤ã«ã§ãããã®ãããVS Code ã® Ansible ã®æ¡å¼µã«ããã¢ã¸ã¥ã¼ã«ã®ãªãã·ã§ã³ã®ãã¼åè£å®æ©è½ã¯å©ç¨ã§ãã¾ãããããè£å®ãããå ´åã¯ãå¥é JSON Schema ãå²ãå½ã¦ããªã©ã®å¯¾å¿ãå¿ è¦ã«ãªãã¯ãã§ãã
â ãããã«
AAP ã®åãããã¯ãã®è¨å®èªååã便å©ã«ãªã infa.aap_configuration
ã³ã¬ã¯ã·ã§ã³ããããã¦ã¿ã¾ããã
ãããããä¼¼ããããªãã¼ã«ãåèªã§ä½æãã¦ããã±ã¼ã¹ãå¤ãã®ã§ã¯ãªããã¨æãã¾ããããã®ã³ã¬ã¯ã·ã§ã³ã®ããã«ãã©ãããªããããªãã¯ãªãªãã¸ããªã§ãæ¹åãéãã¦ããã®ãè¯ãããªã¨æãã¾ããã