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

沒有留言:

張貼留言

2025 My Hardware Personal Computer Used

 2025 My Hardware Personal Computer Used Check Ubunut sudo dmidecode -t 2 sudo lsblk -o NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MODEL 2025 Intel(R...