Skip to content

Commit

Permalink
feat: add ansible configurations
Browse files Browse the repository at this point in the history
This commit adds Ansible configurations to the project. It includes a new file `.vscode/settings.json` with the `ansible.python.interpreterPath` set to `/bin/python3`. The changes in `tasks/main.yml` include renaming "Packages" task to "Gather facts", adding a new block named "Become block" that includes tasks for packages, history date, vimrc and sysstat. Finally, there are updates in `tasks/vimrc.yml`, where mode is now defined as a string instead of an integer.
  • Loading branch information
dgibbs64 committed Jun 25, 2023
1 parent 0ba4d5e commit 71f1c92
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/bin/python3"
}
25 changes: 14 additions & 11 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
---
- name: "Packages"
become: true
ansible.builtin.import_tasks: packages.yml
- name: "Gather facts"
ansible.builtin.setup:
when: ansible_facts|default({}) == {}

- name: "History Date"
- name: "Become block"
become: true
ansible.builtin.import_tasks: historydate.yml
block:
- name: "Packages"
ansible.builtin.include_tasks: packages.yml

- name: "Vimrc"
become: true
ansible.builtin.import_tasks: vimrc.yml
- name: "History Date"
ansible.builtin.include_tasks: historydate.yml

- name: "Sysstat"
become: true
ansible.builtin.import_tasks: sysstat.yml
- name: "Vimrc"
ansible.builtin.include_tasks: vimrc.yml

- name: "Sysstat"
ansible.builtin.include_tasks: sysstat.yml
4 changes: 2 additions & 2 deletions tasks/vimrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
ansible.builtin.copy:
src: "vimrc.local"
dest: "/etc/vim/vimrc.local"
mode: 0644
mode: "0644"
owner: root
when: ansible_os_family == "Debian" and vimrc

- name: "Ensure vimrc.local is set (RedHat Family)"
ansible.builtin.copy:
src: "vimrc.local"
dest: "/etc/vimrc"
mode: 0644
mode: "0644"
owner: root
when: ansible_os_family == "RedHat" and vimrc

0 comments on commit 71f1c92

Please sign in to comment.