aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-01 19:19:16 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-01 19:20:40 +0200
commit93beeac737a5b283fc3ae20d31226ea64bee232b (patch)
tree4003d93d045343a6df62a653f8ad30692b8b2d2f
parentcec301af4f1d2a0512bb483cd9d665d70ec14251 (diff)
p/fuel: Fix opnfv user missing _param
While at it, also use proper mechanism to fetch _param:opnfv* in opnfv/adduser.sls. Change-Id: Ic74e14f609bc1648b30d04f38ac3cca4a6d0850e Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
-rw-r--r--patches/opnfv-fuel/0021-Add-opnfv-user-to-the-deployment.patch19
1 files changed, 10 insertions, 9 deletions
diff --git a/patches/opnfv-fuel/0021-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0021-Add-opnfv-user-to-the-deployment.patch
index 046b080..f2b51d0 100644
--- a/patches/opnfv-fuel/0021-Add-opnfv-user-to-the-deployment.patch
+++ b/patches/opnfv-fuel/0021-Add-opnfv-user-to-the-deployment.patch
@@ -15,11 +15,11 @@ Signed-off-by: Charalampos Kominos <Charalampos.Kominos@enea.com>
Signed-off-by: Guillermo Herrero <Guillermo.Herrero@enea.com>
---
mcp/config/states/maas | 2 ++
- mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml | 3 +++
+ mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml | 4 ++++
.../classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml | 1 +
.../classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml | 1 +
mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++
- 5 files changed, 14 insertions(+)
+ 5 files changed, 15 insertions(+)
create mode 100644 mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml
create mode 100644 mcp/salt-formulas/opnfv/adduser.sls
@@ -45,13 +45,14 @@ index c54225d..6bd0aef 100755
done
diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml
new file mode 100644
-index 0000000..79d18be
+index 0000000..4cea805
--- /dev/null
+++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml
-@@ -0,0 +1,3 @@
+@@ -0,0 +1,4 @@
+parameters:
-+ opnfv_user_username: opnfv
-+ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1
++ _param:
++ opnfv_user_username: opnfv
++ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1
diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml
index 79a8e92..fd615e4 100644
--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml
@@ -74,14 +75,14 @@ index d09c643..f7789c6 100644
# - cluster.baremetal-mcp-ocata-ovs-ha.stacklight
diff --git a/mcp/salt-formulas/opnfv/adduser.sls b/mcp/salt-formulas/opnfv/adduser.sls
new file mode 100644
-index 0000000..9692184
+index 0000000..78ef993
--- /dev/null
+++ b/mcp/salt-formulas/opnfv/adduser.sls
@@ -0,0 +1,7 @@
+add_opnfv_user:
+ user.present:
-+ - name: ${_param:opnfv_user_username}
-+ - password: ${_param:opnfv_user_password}
++ - name: {{ salt['pillar.get']('_param:opnfv_user_username') }}
++ - password: {{ salt['pillar.get']('_param:opnfv_user_password') }}
+ - createhome: True
+ - groups:
+ - sudo