Ansible practise Post author:leojsp 帖子最後修改:2023 年 1 月 27 日 1、安裝和配置Ansible [student@worksataion web2]$ vim inventory [student@worksataion web2]$ cat inventory [dev] servera [test] serverb [prod] serverc serverd [balancers] servere [webservers:children] prod [student@worksataion web2]$ 2、創建和運行Ansible臨時命令 3、安裝軟件包 4、使用RHEL系統角色 5、使用Ansible Galaxy安裝角色 6、創建和使用角色 7、從Ansible Galaxy使用角色 8、創建和使用邏輯卷 9、生成主機文件 10、修改文件內容 11、創建 Web 內容目錄 12、生成硬件報告 13、創建密碼庫 14、創建用戶賬戶. 15、更新 Ansible 庫的密鑰 16、配置 cron 作業創建⼀個名為 /home/greg/ansible/cron.yml 的 playbook ,配置 cron 作業,該作業每隔 2 分鐘運⾏並執⾏以下命令:logger “EX294 in progress”,以⽤戶 natasha 身份運⾏ Let's change the world together Share this content Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window Opens in a new window 你可能也喜歡 Ansible class #4 2022 年 12 月 17 日 ansible nginx 反向代理 RP Server Record 2025 年 9 月 20 日 Ansible class #3 2022 年 12 月 17 日