Inital Commit

Play installs docker, pip and other basic requirements.
Build out dockeruser, and add zware user to docker group.
This commit is contained in:
2022-08-21 20:41:43 -05:00
parent 598ed1f9f9
commit 0b21488aa5
2 changed files with 38 additions and 0 deletions

6
inventory.yml Normal file
View File

@@ -0,0 +1,6 @@
---
all:
hosts:
tower:
ansible_host: 192.168.0.62
vars:

32
media-buildout.yml Normal file
View File

@@ -0,0 +1,32 @@
- hosts: all
become: true
vars:
pip_install_packages:
- name: docker
roles:
- geerlingguy.pip
- geerlingguy.docker
tasks:
- name: install docker tools
ansible.builtin.package:
name: "{{ item }}"
state: present
loop:
- curl
- git
- tree
- vim
- docker-ce
- docker-ce-cli
- docker-compose
- name: Create Dockeruser and Add to Docker Group
ansible.builtin.user:
name: "{{ item.user }}"
shell: "{{ item.shell }}"
groups: "{{ item.groups }}"
loop:
- { user: "zware", shell: "/bin/zsh", groups: "sudo,docker" }
- { user: "dockeruser", shell: "/bin/bash", groups: "docker" }