Skip to content

Instantly share code, notes, and snippets.

@tzutalin
Last active July 31, 2017 07:01
Show Gist options
  • Save tzutalin/fa5c85d0b74098d184813759654ee23d to your computer and use it in GitHub Desktop.
Save tzutalin/fa5c85d0b74098d184813759654ee23d to your computer and use it in GitHub Desktop.
Ansible
---
- name: Installl packages for localhost
hosts: "{{ cluster_name }}"
#hosts: all
become: true
tasks:
- name: install the latest version of vim
package:
name: vim
state: latest
tasks:
- name: install the latest version of curl
package:
name: curl
state: latest
tasks:
- name: install the latest version of git
package:
name: git
state: latest
[k8s_test]
[k8s_test:children]
k8s_test_master
k8s_test_node
[k8s_test_master]
192.168.56.101
[k8s_test_master:vars]
# master_ip_address_configured=1.2.3.4
[k8s_test_node]
192.168.56.102
@tzutalin
Copy link
Author

tzutalin commented Jul 31, 2017

$ ansible-playbook -vvvv basic-tools.yaml -e cluster_name=k8s_test -i intentory --user --ask-sudo-pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment