You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have read and agree to the project's Code of Conduct.
Description
Add an option to perform builds using an Ansible playbook.
Use Case(s)
As Ansible is one of the most-used configuration management tools, I'm sure there would be a large pool of people who could contribute. I have much more skill in Ansible than in BASH (in fact, I rarely use BASH scripts any more) and the ansible toolset is more powerful.
Potential Configuration
---
- name: Build a VMware templategather_facts: falsebecome: falsehosts: localhostvars:
host_list:
rocky9:
input_path: "{{ script_path }}/builds/linux/rocky/9/"vars_files:
- vsphere.pkrvars.hcl
- build.pkrvars.hcl
- ansible.pkrvars.hcl
- proxy.pkrvars.hcl
- common.pkrvars.hcltasks:
# Here we append each member of the var_files list into a packer_build_args variable via a loop.
- name: Build the Packer command line:set_fact:
packer_build_args: "{{ packer_build_args | default('') + '-var-file=\"' + item }} + ' '"loop: "{{ vars_files }}"
- name: "Initialize Packer."shell: "packer init {{ host_list[desired_host]['input_path']}"
- name: "Build a {{ desired_host }} host."shell: "packer build --force {{ host_list[desired_host]['input_path'}}"
tenthirtyam
changed the title
Add an **option** to perform builds using an Ansible playbook
Add an option to perform builds using an Ansible playbook
Sep 23, 2023
I'm going to lock this issue because it has been closed for 30 days. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Code of Conduct
Description
Add an option to perform builds using an Ansible playbook.
Use Case(s)
As Ansible is one of the most-used configuration management tools, I'm sure there would be a large pool of people who could contribute. I have much more skill in Ansible than in BASH (in fact, I rarely use BASH scripts any more) and the ansible toolset is more powerful.
Potential Configuration
ansible-playbook -i localhost, build_vmware_image.yml -e 'desired_host=rocky_9'
References
https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_tags.html
The text was updated successfully, but these errors were encountered: