2022年9月2日 星期五

Ansible 2022

 https://www.tutorialspoint.com/ansible/ansible_environment_setup.htm



sudo apt-get update
sudo apt-get install software-properties-common
sudo apt-add-repository ppa:ansible/ansible
sudo apt-get update
sudo apt-get install ansible
ansible --version
echo ansible 2.10.15


https://tdhopper.com/blog/automating-python-with-ansible

ansible -i 'localhost,' -c local -m ping all

localhost | SUCCESS => {
    "ansible_facts": {
        "discovered_interpreter_python": "/usr/bin/python3"
    },
    "changed": false,
    "ping": "pong"
}

ansible all -i 'localhost, ' -c local -a "/bin/echo hello"
localhost | CHANGED | rc=0 >>
hello


TBC

沒有留言:

張貼留言

2007 to 2023 HP and Dell Servers Comparison

  HP Gen5 to Gen11  using ChatGPT HP ProLiant Gen Active Years CPU Socket Popular HP CPUs Cores Base Clock Max RAM Capacity Comparable Dell ...