2023-08-01ãã1ã¶æéã®è¨äºä¸è¦§
ã¯ããã« ããã¾ã§ä½åº¦ãansible.eda.webhook ã¤ãã³ãã½ã¼ã¹ãã©ã°ã¤ã³ã使ã£ã¦ãWebhook çµç±ã§ä½ããåããã¨ãããã¨ã試ãã¦ã¿ã¾ããã ãã®ã¤ãã³ãã½ã¼ã¹ãã©ã°ã¤ã³ã¯èªè¨¼æ©è½ãæããããã¨ãã§ããã®ã§ããã¼ã¯ã³ã«ããèªè¨¼ã試ãã¦ã¿ã¾ããã æ¤è¨¼â¦
ã¯ããã« ããã¾ã§ ansible-rulebook ã§ã¯ãã©ã㪠action ã§ãé£æºå ã® Automation Controller ã«æ¥ç¶ç¢ºèªãã«ãä»æ§ãããã¾ããã ansible-rulebook 1.0.1 ã§ãaction ã run_job_template ã®ã¨ãã®ã¿æ¥ç¶ç¢ºèªããæ¹åãè¡ããã¾ããã Release v1.0.1 · â¦
ã¯ããã« ååã®è¨äº ã§ã¯ãCloudflare Tunnel ã cloudflared tunnel run ãã³ãã«å ã§èµ·åãã¾ããã ãã©ã¢ã°ã©ã¦ã³ãã§ã®èµ·åã§ã¯ãªãããµã¼ãã¹ã¨ãã¦èµ·åãããã£ãã®ã§è©¦ãã¾ãããåºæ¬çã«ã¯ä»¥ä¸ã®å ¬å¼ããã¥ã¡ã³ãéãã§ãã試è¡é¯èª¤ãããã¨ã«å°â¦
ã¯ãã㫠以åã®è¨äºã§ãEDA Controller ã® REST API ã®æä½ã試ãã¾ããããä½æ³ã¯ãªãã¨ãªãåãã£ãã®ã§æ¬¡ã®ãé¡ã«ãã¤ãã¾ãã ãã¨ã㨠API ã使ããããªã£ããã£ããã«ããªãã®ã§ãããRulebook ã®æ¸ãæ¹ã試è¡é¯èª¤ãã¦ããã¨ãã ãªãã¸ããªä¸ã® Ruleâ¦
ã¯ããã« Cloudflare Tunnel ã¯ãæ軽ã«å é¨ã®ãµã¼ãã¼ãå ¬éã§ãããµã¼ãã¹ã§ããåºå®ã°ãã¼ãã«IPããã¤ã³ãã¦ã³ãã®ãã¼ãéæ¾ãä¸è¦ã§ä¾¿å©ã§ããngrok ããããé¡ä¼¼ãµã¼ãã¹ã«å½ããããªã¨æãã¾ãã developers.cloudflare.com ããã¾ã§ãè¤æ°ã®ãµã¼ãâ¦
ã¯ããã« Automation Controller ã¨åãããEDA Controller ã«ã REST API ãåãã£ã¦ãããã¨ãç¥ãã¾ããã®ã§ãã¡ãã£ã¨è§¦ã£ã¦ã¿ã¾ããã æ¬è¨äºã§ã¯ãAPI ã®å©ãæ¹ã調ã¹æ¹ã¨ãAPI ã§ã®ããã¸ã§ã¯ãã¨ã¢ã¯ãã£ãã¼ã·ã§ã³ã®ä½æã®ä»æ¹ã«ã¤ãã¦æ±ãã¾ãã â¦
ã¯ããã« Postman ã¯ãHTTP ãªã¯ã¨ã¹ããèªç±èªå¨ã«åºãããã¼ã«ã§ãREST API ãå©ãã¨ããªã©ã«å©ç¨ãã¦ãã¾ãã ï¼æè¿ VS Code åãã®æ¡å¼µããããã¨ãç¥ãã¾ããï¼ å¶ç¶ç¥ã£ãã®ã§ãããURL ãå ¥åããæ¬ã« curl ã®ã³ãã³ãããã¼ã¹ãããã¨ãPostman ã®â¦
ã¯ãã㫠以åã®è¨äº ã§ãPalo Alto ãã¡ã¤ã¢ã¦ã©ã¼ã«ã¨ EDA ControllerãAutomation Controller ã®é£æºã試ãã¾ããã è¨äºã®ä¸ã§ã触ãã¦ãã¾ãããEDA Controller ãæ¬å½ã«å¿ è¦ãã©ããã¯èãããã¨ããããæãåããã¦ã¿ã趣æ¨ã§ããã é£æºãèãããâ¦
ã¯ããã« ååã®è¨äºï¼ä»¥ä¸ãEDAããã®è¨äºï¼ã§ãEDA Controller ã使ããPalo Alto ãã¡ã¤ã¢ã¦ã©ã¼ã«ã®è¨å®å¤æ´ãããã³ã³ãã£ã°ã git ã«ããã¯ã¢ããããä»çµã¿ãä½ã£ã¦ã¿ã¾ããã ä½ã£ã¦ããéä¸ãEDA Controller ãçµç±ããªãã¦ãåçã®ãã¨ãå®ç¾ã§ãâ¦