当前位置: 首页> 财经> 访谈 > 深圳龙岗职业技术学校招生_做电商需要投入多少钱_零基础怎么做电商_论坛平台

深圳龙岗职业技术学校招生_做电商需要投入多少钱_零基础怎么做电商_论坛平台

时间:2025/7/12 6:50:33来源:https://blog.csdn.net/qhqh310/article/details/144124490 浏览次数:0次
深圳龙岗职业技术学校招生_做电商需要投入多少钱_零基础怎么做电商_论坛平台

ansible all -i inventory --list-hosts
ansible web -i inventory --list-hosts

ssh-keygen
ssh-copy-id 


 ansible localhost -m ping
 ansible localhost -m command -a "hostname"

 ansible localhost -m command -a "hostname" -o

 ansible localhost -m shell -a "set" -o

 ansible-doc -l | grep temp
 ansible-doc template

 ansible localhost -m template -a "src=/root/aa1.txt dest=/root/aa2.txt"

 yum
yum模块用于在指定节点机器上通过yum管理软件,其支持的参数主要有两个

name:要管理的包名
state:要进行的操作
state常用的值:

latest:安装软件
installed:安装软件
present:安装软件
removed:卸载软件
absent:卸载软件

ansible localhost -m yum -a "name=vsftpd state=present"

ansible localhost -m copy -a "src=/root/aa2.txt dest=/root/aa3.txt"

ansible localhost -m user -a "name=testuser group=test"
ansible localhost -m user -a "name=testuser state=absent remove=yes"

ansible localhost -m service -a "name=vsftpd state=started"
ansible localhost -m service -a "name=vsftpd state=stopped"
ansible localhost -m file -a "path=/root/aa1.txt state=absent"

- name: enable vsftpd and start it
  hosts: localhost
  tasks:
    - name: enable vsftpd
      service:
        name: vsftpd
        enabled: true
    - name: start vsftpd
      service:
        name: vsftpd
        state: started


- name: print facts
  hosts: localhost
  tasks:
    - name: de
      debug:
        var: ansible_facts["interfaces"]

- name: test loop
  hosts: localhost
  vars:
    myitem:
      - test1
      - test2
  tasks:
    - name: print item
      shell: "echo myitem:{{item}}"
      loop: "{{myitem}}"
      register: result
    - name: debug echo
      debug:
        var: result
 

关键字:深圳龙岗职业技术学校招生_做电商需要投入多少钱_零基础怎么做电商_论坛平台

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: