ansible-palybook
Posted augustyang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ansible-palybook相关的知识,希望对你有一定的参考价值。
yum 下载 启动 添加add
- name: install httpd service hosts: nginx tasks: - name: install yum: name=httpd state=present - name: service on service: name=httpd enabled=yes state=started
创建用户:
- name: create user hosts: nginx user: root gather_facts: false vars: user: "test" tasks: - name: create user user: name="{{ user }}"
删除用户
- name: userdel user hosts: nginx user: root gather_facts: false vars: user: "test" tasks: - name: userdel user user: name="{{ user }}" state=absent remove=yes
以上是关于ansible-palybook的主要内容,如果未能解决你的问题,请参考以下文章