aboutsummaryrefslogtreecommitdiff
blob: 19b0ed89d026e93c6742bab4ef6c1a6e45b3e08b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- name: Disable unattended-upgrades
  ansible.builtin.systemd:
    name: unattended-upgrades
    state: stopped
    enabled: false

- name: install packages
  apt:
    update_cache: true
    name:
      - apt-transport-https
      - build-essential
      - ca-certificates
      - mariadb-client
      - lsb-release
      - python3
      - python3-dev
      - python3-pip
      - unzip
      - gnupg
      - htop
      - curl
      - tree
      - zip
      - vim
      - zsh
      - git

- name: add user
  user:
    name: clarkzjw
    shell: /usr/bin/zsh
    home: "{{ user_home }}"
    system: true

- name: Add Docker GPG apt Key
  apt_key:
    url: https://download.docker.com/linux/debian/gpg
    keyring: /etc/apt/trusted.gpg.d/docker.gpg
    state: present

- name: Add Docker Repository
  apt_repository:
    repo: deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/docker.gpg] https://download.docker.com/linux/debian {{ ansible_distribution_release | lower }} stable
    state: present

- name: Update apt and install docker-ce
  apt:
    name:
    - docker-ce
    - docker-ce-cli
    - containerd.io
    - docker-compose-plugin
    state: latest
    update_cache: true

- name: Install Docker Module for Python
  pip:
    name:
    - docker
    - docker-compose

- name: enable docker service
  systemd:
    name: docker
    enabled: true
    daemon_reload: true

- name: Clean unneeded packages
  ansible.builtin.apt:
    autoremove: true
    purge: true
Powered by cgit v1.2.3 (git 2.41.0)