ansible base config

This commit is contained in:
root
2022-06-10 20:43:10 +00:00
commit 2e03f3fc8a
4 changed files with 81 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
[defaults]
inventory=inventory
host_key_checking=False
+22
View File
@@ -0,0 +1,22 @@
[master]
10.40.1.30
[nodes]
10.40.1.31
10.40.1.32
[test]
10.40.1.25
[test:vars]
ansible_ssh_user=root
ansible_ssh_pass=1234
[master:vars]
ansible_ssh_user=root
ansible_ssh_pass=12345
[nodes:vars]
ansible_ssh_user=root
ansible_ssh_pass=12345
+25
View File
@@ -0,0 +1,25 @@
---
- name: git
hosts: test
become: yes
tasks:
- name: Add a setting to ~/.gitconfig
community.general.git_config:
name: http.sslverify
scope: global
value: false
- name: portainer docker-compose file
ansible.builtin.git:
repo: 'https://git.bitsathy.ac.in/ShankarMounesh/portainer.bitsathy.ac.in.git'
dest: /srv/portainer.bitsathy.ac.in
- name: docker-compose
hosts: test
gather_facts: no
tasks:
- name: Create and start services
community.docker.docker_compose:
project_src: /srv/portainer.bitsathy.ac.in/docker
pull: yes
state: absent
+29
View File
@@ -0,0 +1,29 @@
---
- hosts: test
become: no
tasks:
- name: update apt
apt:
update_cache: yes
- name: install docker.io
apt:
name: docker.io
state: present
- name: install docker-compose
apt:
name: docker-compose
state: present
- name: install git
apt:
name: git
state: present
- name: install vim-nux
apt:
name: vim-nox
state: present