Skip to content

Conversation

@arbabnazar
Copy link

@JaveriaK this time I am sending small PR because it's easy for you people to test it and merge in your master branch, last time big PR with a lot of changes got delayed and a lot of conflicts occur between my PR and master so that I have closed that and now created this. Please review the PR and let me know, if you want any modification but it's really straight forward. Thanks

apt:
update_cache: yes
- name: Add PLUMgrid openstack to repo
apt_repository:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ansible has dedicated module for adding the repo. is there any specific reason to use the manual method aka lineinfile module?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, no specific reason. You are right, dedicated module should be used.


- name: Running apt-update
apt:
update_cache: yes
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no reason to use it as apt_repository module has default update_cache

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

repo: "{{ item }}"
filename: plumgrid
state: present
with_items:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding one by one, use the with_items with the apt_repository module to add all the repos.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

state: present
create: yes

- name: Copy PLUMgrid GPG-key file
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JaveriaK instead of copying the GPG key to the server and then add it using can simply upload the public part of your GPG key to the public GPG key server like keyserver.ubuntu.com and then directly get it from there like this:

- name: Add Plumgrid PPA apt key
  apt_key:
    id: "AA798760"
    keyserver: "keyserver.ubuntu.com"
    state: present

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Arbab, thanks for your comments.
Every release of our software has a different GPG key. Making it static would mean we have to manually change it every time for a new release. Also, once we make it static, we wont be able to install previous version of our software with these playbooks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@syedalijabir is there any reason that you are using different GPG for each release?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arbabnazar Oh yes, you are right. @JaveriaK its +1 from my side.

state: present
create: yes

- name: Copy PLUMgrid GPG-key file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Arbab, thanks for your comments.
Every release of our software has a different GPG key. Making it static would mean we have to manually change it every time for a new release. Also, once we make it static, we wont be able to install previous version of our software with these playbooks.


- name: Running apt-update
apt:
update_cache: yes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

apt:
update_cache: yes
- name: Add PLUMgrid openstack to repo
apt_repository:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, no specific reason. You are right, dedicated module should be used.

repo: "{{ item }}"
filename: plumgrid
state: present
with_items:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@arbabnazar
Copy link
Author

@JaveriaK pinging on this, if you need any modification from my side. Thanks

@JaveriaK
Copy link
Member

@arbabnazar thank you for your contribution. @syedalijabir is going through it and will get back to you with any feedback

@syedalijabir
Copy link
Contributor

Hey @arbabnazar, regarding your GPG key query, we sign our debian packages with an internal key that is relevant only to the local deployments so the key changes with our different builds/releases.
Other than this your commit is good to go.

@arbabnazar
Copy link
Author

@JaveriaK @syedalijabir I'll tell you better way to manage the GPG key for signing the debian packages and also share the way that how I am managing my debain PPA with sign package in next PR. Can you please merge it, if you think that it's good enough to get place in your master branch 😄

@syedalijabir
Copy link
Contributor

@arbabnazar, we really appreciate your commit :) and as I said, its good to go into master minus the GPG key. We are all ears on your suggestion regarding a better way to manage GPG key signing.

@arbabnazar
Copy link
Author

@syedalijabir I didn't change anything regarding GPG in this PR, I was just suggesting different way. I think, it's good to merge in master, please let me know if you want any change.

state: present
create: yes

- name: Copy PLUMgrid GPG-key file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arbabnazar Oh yes, you are right. @JaveriaK its +1 from my side.

@JaveriaK
Copy link
Member

@syedalijabir please confirm after a testing run if this is good to merge.

@syedalijabir
Copy link
Contributor

Hi @arbabnazar , I was verifying your commit on our master branch and I hit this issue.
TASK: [plumgrid_common | Create PLUMgrid sources.list] ************************
failed: [infra1]
msg: unsupported parameter for module: filename

Kindly address this issue.

@arbabnazar
Copy link
Author

arbabnazar commented Oct 26, 2016

@syedalijabir I think, you are using the old version of ansible, filename was introduced in 2.1 back in May 2016. Please update your version to latest stable ansible and test again, if you will still see the problem, please let me know.

@syedalijabir
Copy link
Contributor

@arbabnazar , PLUMgrid's ONS plugin gets integrated into OpenStack Ansible (OSA). So we have to go with the same version (1.9.4) as them to avoid conflicts.

@arbabnazar
Copy link
Author

@syedalijabir is it a public or private plugin? if public, please share it with me so I can make it compatible with ansible 2.x

@syedalijabir
Copy link
Contributor

No, it is proprietary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants