diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7cb1ce8..cc548fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,11 +18,7 @@ on: jobs: integration: name: Integration - uses: systemli/github-ansible-workflow/.github/workflows/ansible-integration-workflow.yaml@main + uses: systemli/github-ansible-workflow/.github/workflows/ansible-integration-workflow.yaml@v1.0.0 with: disable-apparmor-mysql: true distros: '[ "debian11", "debian10" ]' - role-dependencies: | - - src: geerlingguy.apache - - src: geerlingguy.php - - src: systemli.mariadb diff --git a/molecule/default/INSTALL.rst b/molecule/default/INSTALL.rst deleted file mode 100644 index c615318..0000000 --- a/molecule/default/INSTALL.rst +++ /dev/null @@ -1,15 +0,0 @@ -******* -Delegated driver installation guide -******* - -Requirements -============ - -This driver is delegated to the developer. Up to the developer to implement -requirements. - -Install -======= - -This driver is delegated to the developer. Up to the developer to implement -requirements. diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 8bc113b..6a465bb 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -2,20 +2,8 @@ - name: Converge hosts: all tasks: - - name: Include role geerlingguy.apache" - include_role: - name: "geerlingguy.apache" - - - name: Include role geerlingguy.php" - include_role: - name: "geerlingguy.php" - - - name: "Include role systemli.mariadb" - include_role: - name: "systemli.mariadb" - - name: "Include ansible-role-roundcube" - include_role: + ansible.builtin.include_role: name: "ansible-role-roundcube" vars: roundcube_mysql_password_enc: "password" diff --git a/molecule/default/create.yml b/molecule/default/create.yml deleted file mode 100644 index d82d0ce..0000000 --- a/molecule/default/create.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -- name: Create - hosts: localhost - connection: local - gather_facts: false - no_log: "{{ molecule_no_log }}" - tasks: - - # TODO: Developer must implement and populate 'server' variable - - - when: server.changed | default(false) | bool - block: - - name: Populate instance config dict - set_fact: - instance_conf_dict: { - 'instance': "{{ }}", - 'address': "{{ }}", - 'user': "{{ }}", - 'port': "{{ }}", - 'identity_file': "{{ }}", } - with_items: "{{ server.results }}" - register: instance_config_dict - - - name: Convert instance config dict to a list - set_fact: - instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}" - - - name: Dump instance config - copy: - content: | - # Molecule managed - - {{ instance_conf | to_json | from_json | to_yaml }} - dest: "{{ molecule_instance_config }}" diff --git a/molecule/default/destroy.yml b/molecule/default/destroy.yml deleted file mode 100644 index ac4ba4a..0000000 --- a/molecule/default/destroy.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- name: Destroy - hosts: localhost - connection: local - gather_facts: false - no_log: "{{ molecule_no_log }}" - tasks: - # Developer must implement. - - # Mandatory configuration for Molecule to function. - - - name: Populate instance config - set_fact: - instance_conf: {} - - - name: Dump instance config - copy: - content: | - # Molecule managed - - {{ instance_conf | to_json | from_json | to_yaml }} - dest: "{{ molecule_instance_config }}" - when: server.changed | default(false) | bool diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index b360950..db9faa0 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -5,12 +5,6 @@ driver: name: delegated platforms: - name: instance -lint: | - yamllint . -# ansible-lint provisioner: name: ansible enabled: false -verifier: - name: ansible - enabled: false diff --git a/molecule/default/prepare.yml b/molecule/default/prepare.yml new file mode 100644 index 0000000..39f7dec --- /dev/null +++ b/molecule/default/prepare.yml @@ -0,0 +1,20 @@ +--- +- name: Prepare + hosts: all + tasks: + - name: Install required Servcies + ansible.builtin.apt: + name: "{{ item }}" + state: present + update_cache: true + loop: + - apache2 + - mariadb-server + + - name: Start required Services + ansible.builtin.service: + name: "{{ item }}" + state: started + loop: + - apache2 + - mariadb diff --git a/molecule/default/verify.yml b/molecule/default/verify.yml deleted file mode 100644 index 79044cd..0000000 --- a/molecule/default/verify.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -# This is an example playbook to execute Ansible tests. - -- name: Verify - hosts: all - gather_facts: false - tasks: - - name: Example assertion - assert: - that: true diff --git a/requirements.yml b/requirements.yml index 7eada88..5072d28 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,5 +1,4 @@ --- - collections: - ansible.posix - community.mysql