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

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...