Nejake minule zmeny
This commit is contained in:
5
inventory.yml
Normal file
5
inventory.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
mailservers:
|
||||||
|
hosts:
|
||||||
|
devtest:
|
||||||
|
ansible_host: 192.168.162.37
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Prvni Playbook
|
- name: Prvni Playbook
|
||||||
hosts: localhost
|
hosts: devtest
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Test Connectivity"
|
- name: "Test Connectivity"
|
||||||
|
|||||||
68
playbooks/initsystem.yml
Normal file
68
playbooks/initsystem.yml
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# Jen kopie vim.yml, kterou chci upravit
|
||||||
|
#
|
||||||
|
# Nainstaluje vim, Pathogen, gruvbox
|
||||||
|
|
||||||
|
- name: Konfigurace Vimu
|
||||||
|
hosts: devtest
|
||||||
|
gather_facts: yes
|
||||||
|
become: no
|
||||||
|
|
||||||
|
vars:
|
||||||
|
vim_dir: "{{ ansible_env.HOME }}/.vim"
|
||||||
|
vimrc: "{{ ansible_env.HOME }}/.vimrc"
|
||||||
|
bashrc: "{{ ansible_env.HOME }}/.bashrc"
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Upgrade balicku
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.apt:
|
||||||
|
update_cache: true
|
||||||
|
upgrade: full
|
||||||
|
- name: Instalace Balicku
|
||||||
|
become: yes
|
||||||
|
package:
|
||||||
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
|
loop:
|
||||||
|
- [ vim, git, mc, curl, wget ]
|
||||||
|
|
||||||
|
- name: Stazeni dotfiles
|
||||||
|
get_url:
|
||||||
|
dest: "{{ item.dst }}"
|
||||||
|
url: "{{ item.src }}"
|
||||||
|
backup: yes
|
||||||
|
force: true
|
||||||
|
mode: 0640
|
||||||
|
loop:
|
||||||
|
- {src: "https://www.martus.cz/soubory/ansible/bashrc.txt", dst: "{{ bashrc }}" }
|
||||||
|
- {src: "https://www.martus.cz/soubory/ansible/vimrc.txt", dst: "{{ vimrc }}" }
|
||||||
|
|
||||||
|
- name: Adresarova struktura
|
||||||
|
file:
|
||||||
|
path: "{{ item }}"
|
||||||
|
state: directory
|
||||||
|
owner: ansibler
|
||||||
|
group: ansibler
|
||||||
|
mode: 0750
|
||||||
|
loop:
|
||||||
|
- "{{ vim_dir }}"
|
||||||
|
- "{{ vim_dir }}/swap"
|
||||||
|
- "{{ vim_dir }}/backup"
|
||||||
|
- "{{ vim_dir }}/autoload"
|
||||||
|
- "{{ vim_dir }}/bundle"
|
||||||
|
|
||||||
|
- name: Pathogen pro instalaci doplnku
|
||||||
|
get_url:
|
||||||
|
dest: "{{ vim_dir }}/autoload/pathogen.vim"
|
||||||
|
url: https://tpo.pe/pathogen.vim
|
||||||
|
|
||||||
|
- name: Vim Pluginy
|
||||||
|
git:
|
||||||
|
dest: "{{ vim_dir }}/bundle/{{ item.name }}"
|
||||||
|
repo: "{{ item.url }}"
|
||||||
|
clone: yes
|
||||||
|
update: yes
|
||||||
|
recursive: no
|
||||||
|
loop:
|
||||||
|
- { name: gruvbox, url: https://github.com/morhetz/gruvbox.git }
|
||||||
|
|
||||||
Reference in New Issue
Block a user