diff --git a/playbooks/files/services/setup_system/nameserver/.gitignore b/playbooks/files/services/setup/system/nameserver/.gitignore similarity index 100% rename from playbooks/files/services/setup_system/nameserver/.gitignore rename to playbooks/files/services/setup/system/nameserver/.gitignore diff --git a/playbooks/roles/services/setup/system/tasks/include/nameserver.yml b/playbooks/roles/services/setup/system/tasks/include/nameserver.yml index b5c051b..c765c97 100644 --- a/playbooks/roles/services/setup/system/tasks/include/nameserver.yml +++ b/playbooks/roles/services/setup/system/tasks/include/nameserver.yml @@ -1,14 +1,14 @@ - name: "nameserver : fetch valkyrie's resolv.conf" ansible.builtin.fetch: src: "/etc/resolv.conf" - dest: "./files/services/setup_system/nameserver/" + dest: "./files/services/setup/system/nameserver/" flat: true when: ansible_hostname == "valkyrie" - name: "nameserver : copy valkyrie's resolv.conf to other hosts" ansible.builtin.copy: - src: "files/services/setup_system/nameserver/resolv.conf" + src: "files/services/setup/system/nameserver/resolv.conf" dest: "{{ services_root_directory }}/valkyrie-resolv.conf" when: ansible_hostname != "valkyrie" diff --git a/playbooks/roles/services/setup/system/tasks/main.yml b/playbooks/roles/services/setup/system/tasks/main.yml index 8d1332a..0de4f9c 100644 --- a/playbooks/roles/services/setup/system/tasks/main.yml +++ b/playbooks/roles/services/setup/system/tasks/main.yml @@ -1,19 +1,19 @@ -- name: "play:services : role:setup_system : tasks:podman" +- name: "play:services : role:setup:system : tasks:podman" ansible.builtin.import_tasks: "include/podman.yml" - tags: "services:setup_system:podman" + tags: "services:setup:system:podman" -- name: "play:services : role:setup_system : tasks:directories" +- name: "play:services : role:setup:system : tasks:directories" ansible.builtin.import_tasks: "include/directories.yml" - tags: "services:setup_system:directories" + tags: "services:setup:system:directories" -- name: "play:services : role:setup_system : tasks:nameserver" +- name: "play:services : role:setup:system : tasks:nameserver" ansible.builtin.import_tasks: "include/nameserver.yml" - tags: "services:setup_system:nameserver" + tags: "services:setup:system:nameserver" -- name: "play:services : role:setup_system : tasks:veth" +- name: "play:services : role:setup:system : tasks:veth" ansible.builtin.import_tasks: "include/veth.yml" - tags: "services:setup_system:veth" + tags: "services:setup:system:veth" -- name: "play:services : role:setup_system : tasks:auto_update" +- name: "play:services : role:setup:system : tasks:auto_update" ansible.builtin.import_tasks: "include/auto_update.yml" - tags: "services:setup_system:auto_update" + tags: "services:setup:system:auto_update" diff --git a/playbooks/roles/services/setup/user/tasks/main.yml b/playbooks/roles/services/setup/user/tasks/main.yml index 928d93c..62c2648 100644 --- a/playbooks/roles/services/setup/user/tasks/main.yml +++ b/playbooks/roles/services/setup/user/tasks/main.yml @@ -1,55 +1,55 @@ -- name: "play:services : role:setup_user:{{ services_service_name }} : tasks:vars" +- name: "play:services : role:setup:user:{{ services_service_name }} : tasks:vars" ansible.builtin.import_role: name: "services/include" vars_from: "user" tags: - - "services:setup_user:user" - - "services:setup_user:{{ services_service_name }}:user" - - "services:{{ services_service_name }}:setup_user:user" - - "services:setup_user:directories" - - "services:setup_user:{{ services_service_name }}:directories" - - "services:{{ services_service_name }}:setup_user:directories" - - "services:setup_user:podman" - - "services:setup_user:{{ services_service_name }}:podman" - - "services:{{ services_service_name }}:setup_user:podman" - - "services:setup_user:auto_update" - - "services:setup_user:{{ services_service_name }}:auto_update" - - "services:{{ services_service_name }}:setup_user:auto_update" - - "services:setup_user:veth" - - "services:setup_user:{{ services_service_name }}:veth" - - "services:{{ services_service_name }}:setup_user:veth" + - "services:setup:user:user" + - "services:setup:user:{{ services_service_name }}:user" + - "services:{{ services_service_name }}:setup:user:user" + - "services:setup:user:directories" + - "services:setup:user:{{ services_service_name }}:directories" + - "services:{{ services_service_name }}:setup:user:directories" + - "services:setup:user:podman" + - "services:setup:user:{{ services_service_name }}:podman" + - "services:{{ services_service_name }}:setup:user:podman" + - "services:setup:user:auto_update" + - "services:setup:user:{{ services_service_name }}:auto_update" + - "services:{{ services_service_name }}:setup:user:auto_update" + - "services:setup:user:veth" + - "services:setup:user:{{ services_service_name }}:veth" + - "services:{{ services_service_name }}:setup:user:veth" -- name: "play:services : role:setup_user:{{ services_service_name }} : tasks:user" +- name: "play:services : role:setup:user:{{ services_service_name }} : tasks:user" ansible.builtin.import_tasks: "include/user.yml" tags: - - "services:setup_user:user" - - "services:setup_user:{{ services_service_name }}:user" - - "services:{{ services_service_name }}:setup_user:user" + - "services:setup:user:user" + - "services:setup:user:{{ services_service_name }}:user" + - "services:{{ services_service_name }}:setup:user:user" -- name: "play:services : role:setup_user:{{ services_service_name }} : tasks:directories" +- name: "play:services : role:setup:user:{{ services_service_name }} : tasks:directories" ansible.builtin.import_tasks: "include/directories.yml" tags: - - "services:setup_user:directories" - - "services:setup_user:{{ services_service_name }}:directories" - - "services:{{ services_service_name }}:setup_user:directories" + - "services:setup:user:directories" + - "services:setup:user:{{ services_service_name }}:directories" + - "services:{{ services_service_name }}:setup:user:directories" -- name: "play:services : role:setup_user:{{ services_service_name }} : tasks:podman" +- name: "play:services : role:setup:user:{{ services_service_name }} : tasks:podman" ansible.builtin.import_tasks: "include/podman.yml" tags: - - "services:setup_user:podman" - - "services:setup_user:{{ services_service_name }}:podman" - - "services:{{ services_service_name }}:setup_user:podman" + - "services:setup:user:podman" + - "services:setup:user:{{ services_service_name }}:podman" + - "services:{{ services_service_name }}:setup:user:podman" -- name: "play:services : role:setup_user:{{ services_service_name }} : tasks:auto_update" +- name: "play:services : role:setup:user:{{ services_service_name }} : tasks:auto_update" ansible.builtin.import_tasks: "include/auto_update.yml" tags: - - "services:setup_user:auto_update" - - "services:setup_user:{{ services_service_name }}:auto_update" - - "services:{{ services_service_name }}:setup_user:auto_update" + - "services:setup:user:auto_update" + - "services:setup:user:{{ services_service_name }}:auto_update" + - "services:{{ services_service_name }}:setup:user:auto_update" -- name: "play:services : role:setup_user:{{ services_service_name }} : tasks:veth" +- name: "play:services : role:setup:user:{{ services_service_name }} : tasks:veth" ansible.builtin.import_tasks: "include/veth.yml" tags: - - "services:setup_user:veth" - - "services:setup_user:{{ services_service_name }}:veth" - - "services:{{ services_service_name }}:setup_user:veth" + - "services:setup:user:veth" + - "services:setup:user:{{ services_service_name }}:veth" + - "services:{{ services_service_name }}:setup:user:veth" diff --git a/playbooks/services.yml b/playbooks/services.yml index a69c4b0..e936081 100644 --- a/playbooks/services.yml +++ b/playbooks/services.yml @@ -4,18 +4,21 @@ roles: - role: "services/datasets/system" - tags: "services:datasets_system" + tags: + - "services:datasets" + - "services:datasets:system" tasks: - - name: "datasets_user" + - name: "datasets : user" ansible.builtin.include_role: name: "services/datasets/user" apply: tags: - "services:{{ services_service_name }}" - - "services:datasets_user" - - "services:datasets_user:{{ services_service_name }}" - - "services:{{ services_service_name }}:datasets_user" + - "services:datasets" + - "services:datasets:user" + - "services:datasets:user:{{ services_service_name }}" + - "services:{{ services_service_name }}:datasets:user" loop: "{{ services_host_services | dict2items | map(attribute='key') }}" loop_control: loop_var: "services_service_name" @@ -26,18 +29,21 @@ roles: - role: "services/setup/system" - tags: "services:setup_system" + tags: + - "services:setup" + - "services:setup:system" tasks: - - name: "setup_user" + - name: "setup : user" ansible.builtin.include_role: name: "services/setup/user" apply: tags: - "services:{{ services_service_name }}" - - "services:setup_user" - - "services:setup_user:{{ services_service_name }}" - - "services:{{ services_service_name }}:setup_user" + - "services:setup" + - "services:setup:user" + - "services:setup:user:{{ services_service_name }}" + - "services:{{ services_service_name }}:setup:user" loop: "{{ services_host_services | dict2items | map(attribute='key') }}" loop_control: loop_var: "services_service_name" @@ -63,18 +69,23 @@ roles: - role: "services/datasets/backups/system" when: the_nine_worlds_production | bool - tags: "services:datasets_backups_system" + tags: + - "services:datasets" + - "services:datasets:backups" + - "services:datasets:backups:system" tasks: - - name: "datasets_backups_user" + - name: "datasets : backups : user" ansible.builtin.include_role: name: "services/datasets/backups/user" apply: tags: - "services:{{ services_service_name }}" - - "services:datasets_backups_user" - - "services:datasets_backups_user:{{ services_service_name }}" - - "services:{{ services_service_name }}:datasets_backups_user" + - "services:datasets" + - "services:datasets:backups" + - "services:datasets:backups:user" + - "services:datasets:backups:user:{{ services_service_name }}" + - "services:{{ services_service_name }}:datasets:backups:user" loop: "{{ services_host_services | dict2items | map(attribute='key') }}" loop_control: loop_var: "services_service_name"