Broken for AWX 17.0.0
Closed this issue · 10 comments
There is no default value for admin_password
anymore
issue-related change in AWX:
Hi,
on my local copy I added the following task on the beginning in awx-install-playbook.yml to fix that issue.
- name: inject custom vars into awx install
ansible.builtin.lineinfile:
path: "{{ awx_repo_dir }}/installer/inventory"
regexp: "^(#\\s?)?{{item.key}}=.*"
line: "{{item.key}}={{item.value}}"
loop: "{{ awx_custom_vars | dict2items }}"
This allows you to supply a default password (and more) by creating the following dictionary:
awx_custom_vars:
admin_password: "password"
http_proxy: "http://proxy:port"
https_proxy: "http://proxy:port"
This way of you can change al l vars defined in the inventory file.
It overlaps with pull request #36. Might be possible to add it there for a future version.
Hi,
on my local copy I added the following task on the beginning in awx-install-playbook.yml to fix that issue.- name: inject custom vars into awx install ansible.builtin.lineinfile: path: "{{ awx_repo_dir }}/installer/inventory" regexp: "^(#\\s?)?{{item.key}}=.*" line: "{{item.key}}={{item.value}}" loop: "{{ awx_custom_vars | dict2items }}"
This allows you to supply a default password (and more) by creating the following dictionary:
awx_custom_vars: admin_password: "password" http_proxy: "http://proxy:port" https_proxy: "http://proxy:port"
This way of you can change al l vars defined in the inventory file.
It overlaps with pull request #36. Might be possible to add it there for a future version.
@DominikBauer1 your solution works great for setting the variables, however the git repo is cloned on every run of the playbook. I added your task as pre_tasks
and that is what happens to me. What is the supposed place that task should be added?
Ok, I think you mean modifying the playbook file on this repository. Is there a way to do it locally?
@danielo515 I maintain a local repository with roles, and don’t pull it from ansible galaxy every time. Therefore, its possible to add it to my local clone.
I created a pull request to sole this issue.
@danielo515 I maintain a local repository with roles, and don’t pull it from ansible galaxy every time. Therefore, its possible to add it to my local clone.
Before I knew ansible galaxy I was just git-cloning any role into my local ansible folder. But being an avid npm user I quickly got seduced by galaxy. Maybe it is a better idea to rely on git. How do you manage yours? It is a single repo with all roles or do you just clone them as you need them?
@danielo515 I maintain a local repository with roles, and don’t pull it from ansible galaxy every time. Therefore, its possible to add it to my local clone.
Before I knew ansible galaxy I was just git-cloning any role into my local ansible folder. But being an avid npm user I quickly got seduced by galaxy. Maybe it is a better idea to rely on git. How do you manage yours? It is a single repo with all roles or do you just clone them as you need them?
Currently i run one repo for all roles. But I don't recommend it, because there is now convenient way to split access security or responsibilityies . We are currently working on splitting it up and it's a lot of work .
But for a private environment it's probably more convenient to use one repo.
@danielo515 I maintain a local repository with roles, and don’t pull it from ansible galaxy every time. Therefore, its possible to add it to my local clone.
Before I knew ansible galaxy I was just git-cloning any role into my local ansible folder. But being an avid npm user I quickly got seduced by galaxy. Maybe it is a better idea to rely on git. How do you manage yours? It is a single repo with all roles or do you just clone them as you need them?
Currently i run one repo for all roles. But I don't recommend it, because there is now convenient way to split access security or responsibilityies . We are currently working on splitting it up and it's a lot of work .
But for a private environment it's probably more convenient to use one repo.
Yeah, for sure I will be using just one repo for all my personal stuff. I was referring if you use git submodules for third party roles (cloning them into your local roles folder and so)
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.