write ansible
This commit is contained in:
22
slides/ansible/examples/bind.yml
Normal file
22
slides/ansible/examples/bind.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Compile BIND
|
||||
hosts: hex
|
||||
become: false
|
||||
environment:
|
||||
PATH: '{{ ansible_env.PATH }}'
|
||||
|
||||
tasks:
|
||||
- name: Git pull BIND
|
||||
ansible.builtin.git:
|
||||
repo: https://gitlab.com/bindrpg/core.git
|
||||
dest: "{{ ansible_user_dir }}/core"
|
||||
clone: true
|
||||
verify_commit: true
|
||||
version: master
|
||||
|
||||
|
||||
- name: Make BIND
|
||||
community.general.make:
|
||||
chdir: "{{ ansible_user_dir }}/core"
|
||||
jobs: 3
|
||||
target: all
|
||||
27
slides/ansible/examples/mmcli.yml
Normal file
27
slides/ansible/examples/mmcli.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Install Mermaid ASCII
|
||||
hosts: laka
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Install deps
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- git
|
||||
- golang
|
||||
- make
|
||||
|
||||
- name: Ensure local src dir exists
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/src/
|
||||
state: directory
|
||||
mode: '0755'
|
||||
- name: Clone mermaid-ascii
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/AlexanderGrooff/mermaid-ascii.git
|
||||
dest: /usr/local/src/mermaid-ascii/
|
||||
update: yes
|
||||
- name: Install mermaid
|
||||
community.general.make:
|
||||
chdir: /usr/local/src/mermaid-ascii/
|
||||
target: install
|
||||
10
slides/ansible/examples/tlmgr.yml
Normal file
10
slides/ansible/examples/tlmgr.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
- name: Install tlmgr
|
||||
hosts: june
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Install texlive
|
||||
ansible.builtin.script: mintex.sh
|
||||
args:
|
||||
creates: /usr/local/bin/tlmgr
|
||||
18
slides/ansible/examples/transmission.yml
Normal file
18
slides/ansible/examples/transmission.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
- name: Make crontab
|
||||
hosts: june
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Late-night transmission start
|
||||
ansible.builtin.cron:
|
||||
name: start transmission
|
||||
minute: 0
|
||||
hour: 3
|
||||
job: /usr/bin/systemctl start transmission
|
||||
- name: Late-night transmission end
|
||||
ansible.builtin.cron:
|
||||
name: stop transmission
|
||||
minute: 0
|
||||
hour: 6
|
||||
job: /usr/bin/systemctl stop transmission
|
||||
24
slides/ansible/examples/tspreed.yml
Normal file
24
slides/ansible/examples/tspreed.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
- name: Install tspreed
|
||||
hosts: october
|
||||
become: true
|
||||
|
||||
tasks:
|
||||
- name: Ensure local src dir exists
|
||||
ansible.builtin.file:
|
||||
path: /usr/local/src/
|
||||
state: directory
|
||||
mode: '0755'
|
||||
- name: Install make
|
||||
ansible.builtin.package:
|
||||
name: make
|
||||
state: present
|
||||
- name: Clone tspreed
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/n-ivkovic/tspreed.git
|
||||
dest: /usr/local/src/tspreed
|
||||
update: yes
|
||||
- name: Install tspreed
|
||||
community.general.make:
|
||||
chdir: /usr/local/src/tspreed
|
||||
target: install
|
||||
Reference in New Issue
Block a user