Skip to content

Commit

Permalink
molecule: all vagrant scenario fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jobcespedes committed Jan 15, 2020
1 parent 6bc9956 commit 5955212
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
2 changes: 0 additions & 2 deletions molecule/all/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ driver:
lint:
name: yamllint
platforms:
# centos7
# ubuntu1804
- name: instance-centos7
box: lpf/centos7docker
- name: instance-ubuntu1804
Expand Down
29 changes: 29 additions & 0 deletions molecule/all/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,32 @@
- rsync
- python-docker
- podman

- name: user namespaces
shell: "{{ item }}"
loop:
- echo "user.max_user_namespaces=2000" >>
/etc/sysctl.d/90-user_namespaces.conf
- sysctl --load /etc/sysctl.d/90-user_namespaces.conf

- name: uid gid mappings
shell: "{{ item }}"
loop:
- usermod --add-subuids 10000-11999 vagrant
- usermod --add-subgids 10000-11999 vagrant

- name: registries
block:
- name: check registry.conf
register: no_registries_conf
stat:
path: /etc/containers/registries.conf

- name: create registries.conf
when: no_registries_conf.stat.exists == false
shell: |
cat << EOF > /etc/containers/registries.conf
[registries.search]
registries = ['docker.io', 'registry.fedoraproject.org',
'quay.io', 'registry.access.redhat.com', 'registry.centos.org']
EOF

0 comments on commit 5955212

Please sign in to comment.