zoukankan      html  css  js  c++  java
  • ansible-playbook启动的多种方式

    #quick start

    ## start the playbook with no password, it will run "sudo su - root" at the target first.
    ## and only use the hosts of playbook

    ansible-playbook -i hosts ~/ansible_playbook_test/site.yml -u lihuanhuan80 --private-key ~/robin.private -e "ansible_become_exe='sudo su -'" -vvv

    ## how to start the testplaybook and input password, it will run "sudo su - root" at the target first.
    ## and only use the hosts of playbook

    ansible-playbook -i hosts ~/ansible_playbook_test/site.yml -u root --ask-pass --ask-become-pass -e "ansible_become_exe='sudo su -'" -vvv

    ## how to start the playbook with hostname list and input the var with start command.
    ansible-playbook -i 'aliyun.lihuanhuan.net,' ./ansible_playbook_test/site.yml --ask-pass --ask-become-pass -e "instance_name='robinhhli' ansible_ssh_user='root' ansible_become_exe='sudo su -'" -vvv

    ## how to use jenkins to run the ansible_playbook
    ansible-playbook -i 'aliyun.lihuanhuan.net,' ./ansible_playbook_test/site.yml -e "instance_name='robinhhli' ansible_ssh_user='root' ansible_ssh_pass='password' ansible_become_pass='password' ansible_become_exe='sudo su -'" -vvv

    如果您喜欢我,可以通过微信请我喝果汁。

    如果有疑问,可以留言或者发邮件给我 lhh_nj@163.com
  • 相关阅读:
    activity 背景透明
    win系统注册缺少的库 32位系统 64位系统
    android 窗
    wireshark抓包分析
    juqery select 标签
    IOS开发应用之Quartz 2D学习指南
    为什么你总会觉得自己的产品不够好
    日志宝
    Android之Inflate()方法用途+setContentView和inflate区别
    Ralasafe
  • 原文地址:https://www.cnblogs.com/lihuanhuan/p/10612121.html
Copyright © 2011-2022 走看看