diff --git a/defaults/main.yml b/defaults/main.yml index dc3af58..6a7e3c7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -40,7 +40,7 @@ jenkins_plugin_manager_url: "{{ jenkins_plugin_manager_url_prefix }}/{{ jenkins_ jenkins_tool_dir: /opt/jenkins_tool jenkins_plugin_manager_path: "{{ jenkins_tool_dir }}/jenkins-plugin-manager.jar" -jenkins_plugin_file: plugins.txt +jenkins_plugin_file: "" jenkins_plugin_file_path: "{{ jenkins_tool_dir }}/plugins.txt" # For JCasc diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index f6fb5ca..ea9bb62 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -1,16 +1,18 @@ --- - name: Converge hosts: all - vars: - jdk_version: 21.0.2 - java_home: /opt/jdk-21.0.2 - jenkins_jcasc_template: jenkins.yaml.j2 - jenkins_systemd_unit_envs: - java_home: "{{ java_home }}" tasks: - name: "Include zhan9san.java" ansible.builtin.include_role: name: "zhan9san.java" + vars: + jdk_version: 21.0.2 - name: "Include zhan9san.jenkins" ansible.builtin.include_role: name: "zhan9san.jenkins" + vars: + java_home: /opt/jdk-21.0.2 + jenkins_plugin_file: plugins.txt + jenkins_jcasc_template: jenkins.yaml.j2 + jenkins_systemd_unit_envs: + java_home: "{{ java_home }}" diff --git a/tasks/main.yml b/tasks/main.yml index 9fa7b11..9994eb8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -43,6 +43,7 @@ - name: Set up Plugin ansible.builtin.include_tasks: file: "setup-plugin.yml" + when: jenkins_plugin_file - name: Set up JCasc ansible.builtin.include_tasks: