Skip to content

Instantly share code, notes, and snippets.

@mrhillsman
Created December 6, 2016 21:18
Show Gist options
  • Save mrhillsman/22861d5476cb3b43770e4a713c925ef2 to your computer and use it in GitHub Desktop.
Save mrhillsman/22861d5476cb3b43770e4a713c925ef2 to your computer and use it in GitHub Desktop.
---
- name: Setup across all nodes
remote_user: root
hosts: all
become: yes
vars:
packages:
- stress-ng
tasks:
- name: Install required packages
apt:
name: "{{ item }}"
state: latest
with_items: "{{ packages }}"
- name: Setup salt-master
remote_user: root
hosts: localhost
become: yes
vars:
packages:
- salt-master
tasks:
- name: Install required packages
apt:
name: "{{ item }}"
state: latest
with_items: "{{ packages }}"
- name: Setup salt-minions
remote_user: root
hosts: salt-minions
become: yes
vars:
packages:
- salt-minions
tasks:
- name: Install required packages
apt:
name: "{{ item }}"
state: latest
with_items: "{{ packages }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment