Sign inSign up

killsnow/ansible

By killsnow

•Updated about 4 years ago

Image
0

410

killsnow/ansible repository overview

⁠From:

x86

python:3.11.0b4-slim-buster

arm64:

python:3.11.0b5-slim-buster

⁠Package:

x86

mlocate net-tools ssh sshpass iputils-ping telnet mysql-client vim ansible python3-virtualenv virtualenv sqlite curl tree

arm64:

gnupg1 mlocate net-tools ssh sshpass iputils-ping telnet vim ansible sqlite curl tree

⁠Python packages already installed:

pip install django
pip install djangorestframework

⁠Volume

/ansible
/root/.ssh

⁠Usage:

docker run -it -v $PWD/ansible:/ansible -v $PWD/ssh:/root/.ssh -p 8000:8000 killsnow/ansible:x86 /bin/bash

⁠Create ansible file structure:

vi ansible-create-inventory.sh

#!/bin/bash
if [ -z $1 ];then
    path=$PWD
else
    path=$1
    mkdir -p $path
fi
mkdir $path/inventory $path/inventory/group_vars $path/inventory/host_vars $path/playbook
echo "[defaults]
inventory=inventory/hosts" >> $path/ansible.cfg
touch $path/inventory/hosts

⁠example:

⁠usage1:

sh -m ansible-create-inventory.sh develop
⁠file structure:
develop/
├── ansible.cfg
├── inventory
│   ├── group_vars
│   ├── host_vars
│   └── hosts
└── playbook

⁠usage2:

./ansible-create-inventory.sh production

⁠file structure:
product/
├── ansible.cfg
├── inventory
│   ├── group_vars
│   ├── host_vars
│   └── hosts
└── playbook

⁠usage3:

./ansible-create-inventory

⁠file structure:
.
├── ansible.cfg
├── inventory
│   ├── group_vars
│   ├── host_vars
│   └── hosts
└── playbook

Tag summary

Content type

Image

Digest

sha256:972d8f7bd…

Size

136.9 MB

Last updated

about 4 years ago

docker pull killsnow/ansible