This repository was archived by the owner on Mar 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +116
-2
lines changed Expand file tree Collapse file tree 8 files changed +116
-2
lines changed Original file line number Diff line number Diff line change 22* /__pycache__
33* .pyc
44/.python-version
5+
6+ # Visual Studio Code
7+ .vscode /
Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ Here is the list of all variables and their default values:
3232## Dependencies
3333
3434- [ staticdev.ansible_galaxy_pyenv] ( https://github.com/staticdev/ansible-galaxy-pyenv )
35- - [ oefenweb.pycharm] ( https://galaxy.ansible.com/oefenweb/pycharm ) (optional)
36- - [ ngetchell.vscode] ( https://galaxy.ansible.com/ngetchell/vscode ) (optional)
35+ - [ gantsign.visual-studio-code] ( https://galaxy.ansible.com/gantsign/visual-studio-code ) (optional)
3736
3837## Example Playbook
3938
Original file line number Diff line number Diff line change 1+ *******
2+ Delegated driver installation guide
3+ *******
4+
5+ Requirements
6+ ============
7+
8+ This driver is delegated to the developer. Up to the developer to implement
9+ requirements.
10+
11+ Install
12+ =======
13+
14+ This driver is delegated to the developer. Up to the developer to implement
15+ requirements.
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Converge
3+ hosts : all
4+ become : true
5+
6+ pre_tasks :
7+ - name : Update apt cache.
8+ apt : update_cache=yes cache_valid_time=600
9+ when : ansible_os_family == 'Debian'
10+
11+ roles :
12+ - ansible-role-python-developer
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Create
3+ hosts : localhost
4+ connection : local
5+ gather_facts : false
6+ no_log : " {{ molecule_no_log }}"
7+ tasks :
8+
9+ # TODO: Developer must implement and populate 'server' variable
10+
11+ - when : server.changed | default(false) | bool
12+ block :
13+ - name : Populate instance config dict
14+ set_fact :
15+ instance_conf_dict : {
16+ ' instance ' : " {{ }}" ,
17+ ' address ' : " {{ }}" ,
18+ ' user ' : " {{ }}" ,
19+ ' port ' : " {{ }}" ,
20+ ' identity_file ' : " {{ }}" , }
21+ with_items : " {{ server.results }}"
22+ register : instance_config_dict
23+
24+ - name : Convert instance config dict to a list
25+ set_fact :
26+ instance_conf : " {{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}"
27+
28+ - name : Dump instance config
29+ copy :
30+ content : |
31+ # Molecule managed
32+
33+ {{ instance_conf | to_json | from_json | to_yaml }}
34+ dest : " {{ molecule_instance_config }}"
Original file line number Diff line number Diff line change 1+ ---
2+ - name : Destroy
3+ hosts : localhost
4+ connection : local
5+ gather_facts : false
6+ no_log : " {{ molecule_no_log }}"
7+ tasks :
8+ # Developer must implement.
9+
10+ # Mandatory configuration for Molecule to function.
11+
12+ - name : Populate instance config
13+ set_fact :
14+ instance_conf : {}
15+
16+ - name : Dump instance config
17+ copy :
18+ content : |
19+ # Molecule managed
20+
21+ {{ instance_conf | to_json | from_json | to_yaml }}
22+ dest : " {{ molecule_instance_config }}"
23+ when : server.changed | default(false) | bool
Original file line number Diff line number Diff line change 1+ ---
2+ dependency :
3+ name : galaxy
4+ options :
5+ role-file : requirements.yml
6+ driver :
7+ name : docker
8+ platforms :
9+ - name : instance
10+ command : ${MOLECULE_DOCKER_COMMAND:-""}
11+ volumes :
12+ - /sys/fs/cgroup:/sys/fs/cgroup:ro
13+ privileged : true
14+ pre_build_image : true
15+ provisioner :
16+ name : ansible
17+ verifier :
18+ name : ansible
Original file line number Diff line number Diff line change 1+ ---
2+ # This is an example playbook to execute Ansible tests.
3+
4+ - name : Verify
5+ hosts : all
6+ gather_facts : false
7+ tasks :
8+ - name : Example assertion
9+ assert :
10+ that : true
You can’t perform that action at this time.
0 commit comments