多系统目标部署与Ansible核心网络模块
多系统目标部署
在进行WordPress安装时,我们希望适应多种操作系统。为此,我们对一些任务进行了调整,使其仅在特定操作系统上运行。
任务调整
- MariaDB绑定地址配置 :Ubuntu的MariaDB默认配置中不包含
bind-address,因此我们仅在CentOS上运行此任务。
- name: configure the mariadb bind address
lineinfile:
dest: "{
{ mariadb.server_config }}"
regexp: "#bind-address=0.0.0.0"
line: "bind-address={
{ mariadb.bind }}"
backup: "yes"
backrefs: "yes"
when: ansible_os_family == 'RedHat'
- SELinux配置 :Ubuntu未安装SELinux,所以此任务仅在CentOS上运行。
- name: set the selinux allowing httpd_t to be permissive is required
selinux_permissive
超级会员免费看
订阅专栏 解锁全文
11万+

被折叠的 条评论
为什么被折叠?



