Unhardcode service user/group uid/gid values
Warn to not change nova uid/gid values after user is created
Change-Id: Iaf4d6493c14175c3aea13035878cc185c1621bef
diff --git a/nova/compute.sls b/nova/compute.sls
index b2d0142..178f770 100644
--- a/nova/compute.sls
+++ b/nova/compute.sls
@@ -132,8 +132,9 @@
{%- else %}
- shell: /bin/false
{%- endif %}
- - uid: 303
- - gid: 303
+ {# note: nova uid/gid values would not be evaluated after user is created. #}
+ - uid: {{ compute.get('nova_uid', 303) }}
+ - gid: {{ compute.get('nova_gid', 303) }}
- system: True
- groups:
{%- if salt['group.info']('libvirtd') %}
@@ -149,7 +150,8 @@
group_nova_compute:
group.present:
- name: nova
- - gid: 303
+ {# note: nova gid value would not be evaluated after user is created. #}
+ - gid: {{ compute.get('nova_gid', 303) }}
- system: True
- require_in:
- user: user_nova_compute
diff --git a/nova/controller.sls b/nova/controller.sls
index d6df274..2b19ba1 100644
--- a/nova/controller.sls
+++ b/nova/controller.sls
@@ -30,8 +30,9 @@
- name: nova
- home: /var/lib/nova
- shell: /bin/false
- - uid: 303
- - gid: 303
+ {# note: nova uid/gid values would not be evaluated after user is created. #}
+ - uid: {{ controller.get('nova_uid', 303) }}
+ - gid: {{ controller.get('nova_gid', 303) }}
- system: True
- require_in:
- pkg: nova_controller_packages
@@ -39,7 +40,8 @@
group_nova:
group.present:
- name: nova
- - gid: 303
+ {# note: nova gid value would not be evaluated after user is created. #}
+ - gid: {{ controller.get('nova_gid', 303) }}
- system: True
- require_in:
- user: user_nova