Docker installation
This commit is contained in:
parent
009993e3a0
commit
04f275eb6e
1
TODO
1
TODO
@ -3,4 +3,3 @@ Redis
|
|||||||
Mysql
|
Mysql
|
||||||
|
|
||||||
integration into wpconf
|
integration into wpconf
|
||||||
wordpress download and config
|
|
31
roles/install-docker/tasks/main.yml
Normal file
31
roles/install-docker/tasks/main.yml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
- name: Install Docker prerequisites
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- gnupg
|
||||||
|
- curl
|
||||||
|
|
||||||
|
- name: Prepare keyring folder
|
||||||
|
become: true
|
||||||
|
file:
|
||||||
|
path: /etc/apt/keyrings
|
||||||
|
state: directory
|
||||||
|
mode: '0744'
|
||||||
|
|
||||||
|
- name: Get keyring
|
||||||
|
become: true
|
||||||
|
shell: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||||
|
|
||||||
|
- name: Add repository
|
||||||
|
become: true
|
||||||
|
shell: echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-pluginsudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-pluginlinux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
|
||||||
|
- name: Update repository and install docker
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- docker-ce
|
||||||
|
- docker-ce-cli
|
||||||
|
- containerd.io
|
||||||
|
- docker-compose-plugin
|
||||||
|
update_cache: yes
|
@ -15,3 +15,10 @@
|
|||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /var/www/{{ vhost_name }}/latest.zip
|
path: /var/www/{{ vhost_name }}/latest.zip
|
||||||
|
|
||||||
|
- name: Setup permissions
|
||||||
|
file:
|
||||||
|
path: /var/www/{{ vhost_name }}
|
||||||
|
owner: www-data
|
||||||
|
group: www-data
|
||||||
|
mode: '0644'
|
@ -12,3 +12,4 @@
|
|||||||
- role: install-php
|
- role: install-php
|
||||||
- role: configure-php
|
- role: configure-php
|
||||||
- role: install-wordpress
|
- role: install-wordpress
|
||||||
|
- role: install-docker
|
Loading…
Reference in New Issue
Block a user