Linux/Ansible: Difference between revisions
< Linux
No edit summary |
No edit summary |
||
Line 30: | Line 30: | ||
ansible hostname -m setup # variables for "hostname" | ansible hostname -m setup # variables for "hostname" | ||
</pre></blockquote> | </pre></blockquote> | ||
== Step-by-step == | == Step-by-step == | ||
# Configure SSH Key access (->[[Linux/SSH]]) | # Configure SSH Key access (->[[Linux/SSH]]) | ||
# | #: <pre>ssh-copy-id -i ~/.ssh/id_rsa user@server</pre> | ||
# Setup file structure | |||
# Run ansible playbook | |||
#:<pre>ansible-playbook</pre> | |||
Revision as of 14:49, 17 May 2019
Other articles |
Install
sudo apt-get install -y software-properties-common sudo add-apt-repository -y ppa:ansible/ansible sudo apt-get update sudo apt-get install -y ansible
Commands
ansible --version
ansible-playbook pb-machinex.yml
ansible hostname -m setup # variables for "hostname"
Step-by-step
- Configure SSH Key access (->Linux/SSH)
ssh-copy-id -i ~/.ssh/id_rsa user@server
- Setup file structure
- Run ansible playbook
ansible-playbook