Created
April 16, 2018 19:58
-
-
Save RyanSquared/dabb1643075e5eb6ccb4d55114b6e7d9 to your computer and use it in GitHub Desktop.
Ansible stuffs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[defaults] | |
inventory = ./hosts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[localhost_group] | |
localhost ansible_connection=local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: "Load packages data" | |
include_vars: | |
file: packages.yml | |
- name: "Install APT packages" | |
apt: | |
name: "{{ packages | map(attribute=distro_name) | list }}" | |
state: present | |
when: ansible_os_family == "Debian" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages: | |
- name: vim | |
ubuntu: vim-nox-py2 | |
- name: py3 | |
ubuntu: python3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment