diff --git a/roles/ubuntu/tasks/main.yml b/roles/ubuntu/tasks/main.yml index e4e4550..536d663 100644 --- a/roles/ubuntu/tasks/main.yml +++ b/roles/ubuntu/tasks/main.yml @@ -2,3 +2,5 @@ - import_tasks: cleanup.yml - import_tasks: timezone.yml + +- import_tasks: snap.yml \ No newline at end of file diff --git a/roles/ubuntu/tasks/snap.yml b/roles/ubuntu/tasks/snap.yml new file mode 100644 index 0000000..9d7f117 --- /dev/null +++ b/roles/ubuntu/tasks/snap.yml @@ -0,0 +1,19 @@ +--- +- become: yes + block: + - name: Get the list of services + service_facts: + + - name: stop snapd + systemd: + name: snapd + state: stopped + when: "'snapd.service' in services" + + - name: uninstall snapd + apt: + update_cache: yes + state: absent + purge: yes + pkg: + - snapd