From 170d68e7bc658c6bc0be2374f3043f8dcea2f499 Mon Sep 17 00:00:00 2001 From: Dmitry Ilvokhin Date: Sat, 6 Jan 2024 18:38:35 +0000 Subject: Move playbooks to a separate directory --- README.txt | 2 +- ansible.cfg | 1 + essential.yml | 7 ------- playbooks/essential.yml | 7 +++++++ roles/users/tasks/main.yml | 2 +- setup.yml | 9 --------- 6 files changed, 10 insertions(+), 18 deletions(-) delete mode 100644 essential.yml create mode 100644 playbooks/essential.yml delete mode 100644 setup.yml diff --git a/README.txt b/README.txt index 5500b70..46ad9ff 100644 --- a/README.txt +++ b/README.txt @@ -10,4 +10,4 @@ $ pip3 install -r requirements.txt RUN -$ ansible-playbook setup.yml +$ ansible-playbook essential.yml diff --git a/ansible.cfg b/ansible.cfg index 600b508..4423c2a 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,6 @@ [defaults] inventory = hosts.ini +roles_path = roles remote_user = root # Don't want to see warning about Python. On everything I run, proper Python 3 # should be discoverable. diff --git a/essential.yml b/essential.yml deleted file mode 100644 index dc08d81..0000000 --- a/essential.yml +++ /dev/null @@ -1,7 +0,0 @@ -- name: Essential setup for all hosts - hosts: all - roles: - - { role: minimal } - - { role: users } - - { role: sudo } - - { role: atop } diff --git a/playbooks/essential.yml b/playbooks/essential.yml new file mode 100644 index 0000000..dc08d81 --- /dev/null +++ b/playbooks/essential.yml @@ -0,0 +1,7 @@ +- name: Essential setup for all hosts + hosts: all + roles: + - { role: minimal } + - { role: users } + - { role: sudo } + - { role: atop } diff --git a/roles/users/tasks/main.yml b/roles/users/tasks/main.yml index 264ad28..dea8a82 100644 --- a/roles/users/tasks/main.yml +++ b/roles/users/tasks/main.yml @@ -22,7 +22,7 @@ - name: Update authorized_keys for Dmitry Ilvokhin ansible.builtin.copy: - src: roles/users/files/id_rsa.pub + src: files/id_rsa.pub dest: /home/d/.ssh/authorized_keys owner: d group: d diff --git a/setup.yml b/setup.yml deleted file mode 100644 index 0824014..0000000 --- a/setup.yml +++ /dev/null @@ -1,9 +0,0 @@ -- name: Basic setup for all hosts - hosts: all - roles: - - { role: essential } - -- name: Setup web hosts - hosts: web - roles: - - { role: web } -- cgit v1.2.3-70-g09d2