Getting started with ansible on fedora 26
Once we have installed Ansible, it can be tested with localhost without much of additional configuration.
$ ssh-copy-id cipher@localhost
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/cipher/.ssh/id_rsa.pub"
Number of key(s) added: 1
$ ansible all -i localhost, -m ping
localhost | SUCCESS => {
"changed": false,
"ping": "pong"
}
The default inventory file is at /etc/ansible/hosts. Example:
mail.example.com
[webservers]
one.ansible.box
two.ansible.box
[dbservers]
three.ansible.box
four.ansible.box
Create new volumes and use virt-clone to clone existing VMs:
$ sudo virsh vol-create-as store linux3 25G
Vol linux3 created
$ sudo virsh vol-create-as store linux4 25G
Vol linux4 created
$ virt-clone --force -o linux3 -n linux4 -f /dev/store/linux4
Clone 'linux4' created successfully.
$ virt-sysprep -d linux4
[ 0.0] Examining the guest ...
[ 36.6] Performing "abrt-data" ...
...
[ 45.7] Performing "lvm-uuids" ...
$ virsh list
Id Name State
----------------------------------------------------
2 linux3 running
4 linux4 running
Related Articles
Ansible installation on fedora 26
Ansible is an infrastructure configuration management tool like Chef, Puppet, Salt but what sets Ansible apart is its simple architecture which relies on SSH.
Getting started with ansible on fedora 26
Once we have installed Ansible, it can be tested with localhost without much of additional configuration.
How We Set Up Our KVM Hypervisor: From Bare Metal to Production-Ready VM Host
Detailed walkthrough of building a dedicated KVM/libvirt hypervisor with XFS tuning, hugepages, 10GbE tuning, and automation.