Skip to content

Commit

Permalink
Support root containers for podman
Browse files Browse the repository at this point in the history
By adding "rootless: false" support root containers for podman
driver.
  • Loading branch information
sshnaidm committed Jun 7, 2020
1 parent d0ad881 commit 3499e97
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions molecule/model/schema_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ def pre_validate_base_schema(env, keep_string):
"network": {"type": "string"},
"cert_path": {"type": "string"},
"tls_verify": {"type": "boolean"},
'rootless': {'type': 'boolean'},
},
},
}
Expand Down
1 change: 1 addition & 0 deletions molecule/provisioner/ansible/playbooks/podman/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
become: "{{ not (item.rootless|default(true)) }}"
tasks:

- name: Log into a container registry
Expand Down
1 change: 1 addition & 0 deletions molecule/provisioner/ansible/playbooks/podman/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
become: "{{ not (item.rootless|default(true)) }}"
tasks:
- name: Destroy molecule instance(s)
shell: podman container exists {{ item.name }} && podman rm -f {{ item.name }} || true
Expand Down
1 change: 1 addition & 0 deletions molecule/test/resources/playbooks/podman/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
hosts: localhost
connection: local
gather_facts: false
become: "{{ not (item.rootless|default(true)) }}"
tasks:
- name: Log into a container registry
command: >
Expand Down
1 change: 1 addition & 0 deletions molecule/test/resources/playbooks/podman/destroy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
become: "{{ not (item.rootless|default(true)) }}"
tasks:
- name: Destroy molecule instance(s)
shell: podman container exists {{ item.name }} && podman rm -f {{ item.name }} || true
Expand Down

0 comments on commit 3499e97

Please sign in to comment.