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:
6
inventory.yml
Normal file
6
inventory.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
all:
|
||||||
|
hosts:
|
||||||
|
tower:
|
||||||
|
ansible_host: 192.168.0.62
|
||||||
|
vars:
|
||||||
32
media-buildout.yml
Normal file
32
media-buildout.yml
Normal 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" }
|
||||||
Reference in New Issue
Block a user