added playbook personal-linux-config
This commit is contained in:
7
personal-linux-config.yml
Normal file
7
personal-linux-config.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
tasks:
|
||||
- import_tasks: tasks/debian-general/git.yml
|
||||
when: ansible_facts["os_family"] == "Debian"
|
||||
- import_tasks: tasks/general/personal-linux-config.yml
|
||||
7
tasks/debian-general/git.yml
Normal file
7
tasks/debian-general/git.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Ensure git is installed and updated
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 0
|
||||
name: git
|
||||
state: latest
|
||||
16
tasks/general/personal-linux-config.yml
Normal file
16
tasks/general/personal-linux-config.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: Ensure the hostname package is installed and updated
|
||||
ansible.builtin.apt:
|
||||
update_cache: yes
|
||||
cache_valid_time: 0
|
||||
name: hostname
|
||||
state: latest
|
||||
- name: Ensure the personal-linux-config repositories is updated
|
||||
ansible.builtin.git:
|
||||
dest: /root/personal-linux-config
|
||||
repo: https://git.bjphoster.com/b.pedini/personal-linux-config
|
||||
clone: yes
|
||||
update: yes
|
||||
- name: Ensure the config changes are deployed
|
||||
ansible.builtin.shell:
|
||||
cmd: sh -c "cd /root/personal-linux-config; bash /root/personal-linux-config/deploy.sh --server"
|
||||
Reference in New Issue
Block a user