-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from SURFscz/surfconext/test2
Surfconext/test2
- Loading branch information
Showing
52 changed files
with
650 additions
and
1,060 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,4 +82,3 @@ jobs: | |
echo ===netstat===; netstat -lnp; | ||
'" | ||
if: failure() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
# this role is used to install docker on the host | ||
# only used on dev hosts | ||
|
||
- name: Add Docker GPG key. | ||
ansible.builtin.apt_key: | ||
url: "https://download.docker.com/linux/debian/gpg" | ||
state: "present" | ||
|
||
- name: Add Docker repository. | ||
ansible.builtin.apt_repository: | ||
repo: "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable" | ||
state: "present" | ||
|
||
- name: Create docker config directory | ||
ansible.builtin.file: | ||
path: "/etc/docker" | ||
state: "directory" | ||
owner: "root" | ||
group: "root" | ||
mode: "0755" | ||
|
||
- name: Install docker config | ||
ansible.builtin.copy: | ||
content: | | ||
{ | ||
"log-driver": "journald", | ||
"log-opts": { | ||
} | ||
} | ||
dest: "/etc/docker/daemon.json" | ||
owner: "root" | ||
group: "root" | ||
mode: "0644" | ||
|
||
- name: Install docker | ||
ansible.builtin.apt: | ||
name: "docker-ce" | ||
state: "present" | ||
notify: | ||
- "start docker" | ||
|
||
- name: Add ansible user to docker group | ||
ansible.builtin.user: | ||
name: "ansible" | ||
groups: "docker" | ||
append: true | ||
|
||
# hackish way to allow name resolution from the host | ||
# it watches the docker daemon and updates /etc/hosts on the host | ||
- name: Install name resolution container | ||
docker_container: | ||
name: "name-resolver" | ||
image: "dvdarias/docker-hoster" | ||
state: "started" | ||
restart_policy: "always" | ||
volumes: | ||
- "/var/run/docker.sock:/tmp/docker.sock" | ||
- "/etc/hosts:/tmp/hosts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,10 @@ | ||
--- | ||
- name: Install docker | ||
block: | ||
- name: Add Docker GPG key. | ||
ansible.builtin.apt_key: | ||
url: "https://download.docker.com/linux/debian/gpg" | ||
state: "present" | ||
|
||
- name: Add Docker repository. | ||
ansible.builtin.apt_repository: | ||
repo: "deb [arch=amd64] https://download.docker.com/linux/debian bullseye stable" | ||
state: "present" | ||
|
||
- name: Create docker config directory | ||
ansible.builtin.file: | ||
path: "/etc/docker" | ||
state: "directory" | ||
owner: "root" | ||
group: "root" | ||
mode: "0755" | ||
|
||
- name: Install docker config | ||
ansible.builtin.copy: | ||
content: | | ||
{ | ||
"log-driver": "journald", | ||
"log-opts": { | ||
} | ||
} | ||
dest: "/etc/docker/daemon.json" | ||
owner: "root" | ||
group: "root" | ||
mode: "0644" | ||
|
||
- name: Install docker | ||
ansible.builtin.apt: | ||
name: "docker-ce" | ||
state: "present" | ||
notify: | ||
- "start docker" | ||
|
||
- name: Add ansible user to docker group | ||
ansible.builtin.user: | ||
name: "ansible" | ||
groups: "docker" | ||
append: true | ||
|
||
# hackish way to allow name resolution from the host | ||
# it watches the docker daemon and updates /etc/hosts on the host | ||
- name: Install name resolution container | ||
docker_container: | ||
name: "name-resolver" | ||
image: "dvdarias/docker-hoster" | ||
state: "started" | ||
restart_policy: "always" | ||
volumes: | ||
- "/var/run/docker.sock:/tmp/docker.sock" | ||
- "/etc/hosts:/tmp/hosts" | ||
|
||
when: "environment_name=='vm'" | ||
include_tasks: "docker_setup.yml" | ||
when: "is_dev" | ||
|
||
- name: Create the internal network | ||
community.docker.docker_network: | ||
name: "{{internal_network}}" | ||
enable_ipv6: false | ||
state: "present" |
Oops, something went wrong.