From 12681cca94e179b00ed8807455a8420a795a3606 Mon Sep 17 00:00:00 2001 From: LinuxSquare Date: Thu, 27 Jun 2024 22:39:51 +0200 Subject: [PATCH] Add ansible playbook --- system/ansible.ansible.yml | 23 +++++++++++++++++++++++ system/files/ansible_config | 3 +++ system/shell.ansible.yml | 1 + 3 files changed, 27 insertions(+) create mode 100644 system/files/ansible_config diff --git a/system/ansible.ansible.yml b/system/ansible.ansible.yml index e69de29..a8a1cc6 100644 --- a/system/ansible.ansible.yml +++ b/system/ansible.ansible.yml @@ -0,0 +1,23 @@ +- hosts: localhost + vars_files: + - ../map.yml + tasks: + - name: Install ansible packages + package: + name: + - ansible + state: present + - name: Populate ansible config + template: + src: files/ansible_config + dest: /etc/ansible/ansible.cfg + owner: root + group: root + mode: '0644' + - name: Ansible log directory + file: + state: directory + path: /var/log/ansible + owner: root + group: root + mode: '0700' diff --git a/system/files/ansible_config b/system/files/ansible_config new file mode 100644 index 0000000..38ee0e8 --- /dev/null +++ b/system/files/ansible_config @@ -0,0 +1,3 @@ +[defaults] +inventory=/srv/ansible/inventory.yml +log_path=/var/log/ansible diff --git a/system/shell.ansible.yml b/system/shell.ansible.yml index 44a2e16..d576643 100644 --- a/system/shell.ansible.yml +++ b/system/shell.ansible.yml @@ -8,6 +8,7 @@ - zsh - alpine-zsh-config - bash + state: present - name: Populate shell profile template: src: files/shell_profile.j2