-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCTOPUS-625:Moved Ignition and templates files to virtual machine folder #20
Conversation
Signed-off-by: Punith Kenchappa <[email protected]>
virtual_machine_create_userdata: "#!/bin/sh\nyum -y install python3" | ||
virtual_machine_create_userdata: "{{ lookup('template', 'worker-amd64.ign.j2') }}" | ||
# virtual_machine_create_userdata: "{{ lookup('file', '/var/www/html/ignition/worker-amd64.ign') | string }}" | ||
# virtual_machine_create_userdata: "#!/bin/sh\nyum -y install python3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# virtual_machine_create_userdata: "#!/bin/sh\nyum -y install python3" |
virtual_machine_create_volume_size: 80 | ||
virtual_machine_create_keypair_name: pun_keypair | ||
virtual_machine_create_network_name: provider | ||
virtual_machine_create_userdata: "#!/bin/sh\nyum -y install python3" | ||
virtual_machine_create_userdata: "{{ lookup('template', 'worker-amd64.ign.j2') }}" | ||
# virtual_machine_create_userdata: "{{ lookup('file', '/var/www/html/ignition/worker-amd64.ign') | string }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# virtual_machine_create_userdata: "{{ lookup('file', '/var/www/html/ignition/worker-amd64.ign') | string }}" |
@@ -21,3 +23,18 @@ virtual_machine_create_userdata: "#!/bin/sh\nyum -y install python3" | |||
# - ansible | |||
# package_upgrade: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# package_upgrade: true |
@@ -21,3 +23,18 @@ virtual_machine_create_userdata: "#!/bin/sh\nyum -y install python3" | |||
# - ansible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# - ansible |
@@ -1,7 +1,7 @@ | |||
--- | |||
- name: Create worker.ign and store it to /var/www/html/ignition/ | |||
ansible.builtin.get_url: | |||
url: https://{{ bastion_ip }}:22623/config/worker | |||
url: https://{{ virtual_machine_create_bastion_ip }}:22623/config/worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url: https://{{ virtual_machine_create_bastion_ip }}:22623/config/worker | |
url: https://{{ bastion_ip }}:22623/config/worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's just call it bastion_ip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names . if we just keep bastion_ip it was giving error .
@@ -14,8 +14,8 @@ | |||
|
|||
- name: Set the variables (To be used in Customization Script) | |||
ansible.builtin.set_fact: | |||
worker_hostname_encoded: "{{ worker_hostname | b64encode }}" | |||
dns_none_encoded: "{{ dns_none_conf | b64encode }}" | |||
worker_hostname_encoded: "{{ virtual_machine_create_worker_hostname | b64encode }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
worker_hostname_encoded: "{{ virtual_machine_create_worker_hostname | b64encode }}" | |
worker_hostname_encoded: "{{ worker_hostname | b64encode }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use worker_hostname. it's more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names .
worker_hostname_encoded: "{{ worker_hostname | b64encode }}" | ||
dns_none_encoded: "{{ dns_none_conf | b64encode }}" | ||
worker_hostname_encoded: "{{ virtual_machine_create_worker_hostname | b64encode }}" | ||
dns_none_encoded: "{{ virtual_machine_create_dns_none_conf | b64encode }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use dns_none_conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above .
worker_hostname_encoded: "{{ worker_hostname | b64encode }}" | ||
dns_none_encoded: "{{ dns_none_conf | b64encode }}" | ||
worker_hostname_encoded: "{{ virtual_machine_create_worker_hostname | b64encode }}" | ||
dns_none_encoded: "{{ virtual_machine_create_dns_none_conf | b64encode }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dns_none_encoded: "{{ virtual_machine_create_dns_none_conf | b64encode }}" | |
dns_none_encoded: "{{ dns_none_conf | b64encode }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names .
@@ -1,5 +1,8 @@ | |||
--- | |||
# file: intel-worker-playbook.yml | |||
- name: Add identity resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Add identity resources | |
- name: Add ignition resources |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure , I will make these changes.
search {{ virtual_machine_create_domain_name }} | ||
nameserver {{ virtual_machine_create_bastion_ip }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
search {{ virtual_machine_create_domain_name }} | |
nameserver {{ virtual_machine_create_bastion_ip }} | |
search {{ domain_name }} | |
nameserver {{ bastion_ip }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names .
"path": "/etc/NetworkManager/conf.d/90-dns-none.conf", | ||
"user": {}, | ||
"contents": { | ||
"source": "data:text/plain;base64,{{ virtual_machine_create_dns_none_encoded }}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"source": "data:text/plain;base64,{{ virtual_machine_create_dns_none_encoded }}", | |
"source": "data:text/plain;base64,{{ dns_none_encoded }}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names .
"path": "/etc/resolv.conf", | ||
"user": {}, | ||
"contents": { | ||
"source": "data:text/plain;base64,{{ virtual_machine_create_etc_resolve_encoded }}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"source": "data:text/plain;base64,{{ virtual_machine_create_etc_resolve_encoded }}", | |
"source": "data:text/plain;base64,{{ etc_resolve_encoded }}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names .
"path": "/etc/hostname", | ||
"user": {}, | ||
"contents": { | ||
"source": "data:text/plain;base64,{{ virtual_machine_create_worker_hostname_encoded }}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"source": "data:text/plain;base64,{{ virtual_machine_create_worker_hostname_encoded }}", | |
"source": "data:text/plain;base64,{{ hostname_encoded }}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names .
"config": { | ||
"merge": [ | ||
{ | ||
"source": "http://{{ virtual_machine_create_bastion_ip }}:{{ virtual_machine_create_http_port }}/ignition/worker-amd64.ign" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"source": "http://{{ virtual_machine_create_bastion_ip }}:{{ virtual_machine_create_http_port }}/ignition/worker-amd64.ign" | |
"source": "http://{{ bastion_ip }}:{{ http_port }}/ignition/worker-amd64.ign" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible lint expects to have a role name as a prefix for the variable names .
Hey Punith, Made some comments based on readability. |
Discussed with Punith the restrictions on variable names |
Removed the ignition roles and added as part of virtual machine task .
Modified the templates for virtual machine .