From af78a2b68e25296ecf2187199bb9e3b2ed370e46 Mon Sep 17 00:00:00 2001 From: binary Date: Tue, 3 Nov 2020 23:25:41 +0100 Subject: Move playbook to subdir --- ansible.cfg | 2 ++ pf.yml | 8 -------- playbooks/p.yml | 12 ++++++++++++ playbooks/pf.yml | 8 ++++++++ playbooks/site.yml | 8 ++++++++ playbooks/sshdns.yml | 13 +++++++++++++ playbooks/update.yml | 11 +++++++++++ site.yml | 8 -------- update.yml | 17 ----------------- 9 files changed, 54 insertions(+), 33 deletions(-) delete mode 100644 pf.yml create mode 100644 playbooks/p.yml create mode 100644 playbooks/pf.yml create mode 100644 playbooks/site.yml create mode 100644 playbooks/sshdns.yml create mode 100644 playbooks/update.yml delete mode 100644 site.yml delete mode 100644 update.yml diff --git a/ansible.cfg b/ansible.cfg index f624d91..a928ad6 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,5 +1,7 @@ [defaults] + inventory = inventory.yml interpreter_python = auto_silent jinja2_extensions = jinja2.ext.do,jinja2.ext.i18n +roles_path = roles/ diff --git a/pf.yml b/pf.yml deleted file mode 100644 index 683cf69..0000000 --- a/pf.yml +++ /dev/null @@ -1,8 +0,0 @@ - -# pf.yml -# pf for openbsd hosts. - -- hosts: openbsd - - roles: - - pf diff --git a/playbooks/p.yml b/playbooks/p.yml new file mode 100644 index 0000000..0e37fb8 --- /dev/null +++ b/playbooks/p.yml @@ -0,0 +1,12 @@ + +# p.yml + +--- + +- hosts: "{{ host }}" + + tasks: + + - include_role: + name: "{{ role }}" + tasks_from: "{{ task }}" diff --git a/playbooks/pf.yml b/playbooks/pf.yml new file mode 100644 index 0000000..683cf69 --- /dev/null +++ b/playbooks/pf.yml @@ -0,0 +1,8 @@ + +# pf.yml +# pf for openbsd hosts. + +- hosts: openbsd + + roles: + - pf diff --git a/playbooks/site.yml b/playbooks/site.yml new file mode 100644 index 0000000..29f4033 --- /dev/null +++ b/playbooks/site.yml @@ -0,0 +1,8 @@ + +# site.yml +# Deploy configuration to all servers. + +- hosts: all + + roles: + - common diff --git a/playbooks/sshdns.yml b/playbooks/sshdns.yml new file mode 100644 index 0000000..a73624c --- /dev/null +++ b/playbooks/sshdns.yml @@ -0,0 +1,13 @@ + +# sshdns.yml +# bind host to dns for ssh + +--- + +- hosts: localhost + + tasks: + + - include_role: + name: ssh + tasks_from: generate_dns diff --git a/playbooks/update.yml b/playbooks/update.yml new file mode 100644 index 0000000..ca2587e --- /dev/null +++ b/playbooks/update.yml @@ -0,0 +1,11 @@ + +# update.yml + +--- + +- name: Updates all instances with latest packages from their distribution repositories + strategy: free + hosts: servers + roles: + - update + diff --git a/site.yml b/site.yml deleted file mode 100644 index 29f4033..0000000 --- a/site.yml +++ /dev/null @@ -1,8 +0,0 @@ - -# site.yml -# Deploy configuration to all servers. - -- hosts: all - - roles: - - common diff --git a/update.yml b/update.yml deleted file mode 100644 index cb855ec..0000000 --- a/update.yml +++ /dev/null @@ -1,17 +0,0 @@ -# =========================================================================== # -# __ __ __ -# ____ / /___ ___ __ __ ______ ____/ /___ _/ /____ -# / __ \/ / __ `/ / / / / / / / __ \/ __ / __ `/ __/ _ \ -# / /_/ / / /_/ / /_/ / / /_/ / /_/ / /_/ / /_/ / /_/ __/ -# / .___/_/\__,_/\__, (_) \__,_/ .___/\__,_/\__,_/\__/\___/ -# /_/ /____/ /_/ -# -# =========================================================================== # - ---- -- name: Updates all instances with latest packages from their distribution repositories - strategy: free - hosts: servers - roles: - - update - -- cgit v1.2.3